miniquad icon indicating copy to clipboard operation
miniquad copied to clipboard

Exposing sapp-android (for Keyboard and Fullscreen)

Open comcloudway opened this issue 4 years ago • 0 comments

Pre I know that there ist the #176 Discussion, but it doesn't focus on the idea of using miniquad to build apps instead of games.

The problem & potential Miniquad on android calls the auto_hide_nav_bar function, which hides the navigation bar and toggles immersive/fullscreen mode. And while I understand, that one normally wants to run a game in fullscreen mode, but libraries like egui-miniquad allow building cross-platform apps using rust, miniquad and egui.

One way to allow app development using miniquad, would be to expose the sapp-android functions, so that the user level main function can access the Native Activity.

partial success In fact there is already a PR trying to expose the NativeActivity #267, but it doesn't expose all neccessary functions.

While it would allow accessing the NativeActivity(ndk) and the ANativeActivity(ndk-sys), the show_soft_input function doesn't appear to be working. And the setWindowFlags function also doesn't appear to be working, when trying to reverse the auto_hide_nav_bar.

But I can validate that the PR #267 is infact working properly, because the finish function is successfully closing the app. So the correct NativeActivity is being returned

What could change

  • Expose the functions in the sapp-android native module to allow accessing some of the native functions
  • merge PR #267 to allow access to the NativeActivity
  • add function to revert the auto_hide_nav_bar function, to toggle fullscreen mode on android on the fly

comcloudway avatar Feb 26 '22 05:02 comcloudway