2

I have to set immersive_sticky for my app. The code works at startup, but when the app is being resumed it causes an exception about how only the UI thread can touch the view. How could I do this from c++ because the solution I saw was runonuithread for java.

This is where I found the code to get it working for startup:

How do I enable full screen immersive mode for a Native Activity NDK app?

cyb3rcolby
  • 53
  • 7
  • See https://stackoverflow.com/questions/44808206/android-jni-call-function-on-android-ui-thread-from-c I'm not sure if you need to call `ALooper_forThread` from a native app, or if you can just use the `looper` member of your `android_app` instance. I suppose it would be easy for you to try both ways and see what works. – Michael Sep 03 '19 at 08:43
  • Nothing easy about this. I'm already using Looper poll all in an infinite loop for my game engine. I don't make much sense out of that link ejther. – cyb3rcolby Sep 03 '19 at 13:02

0 Answers0