On 14.08.2019 at 10:09 Alex Cohn wrote:
> But you should not run a modal loop on UI thread: for the Android system, this would mean that you keep the UI thread too long, and will promptly trigger ANR.
That's the question. The Android NDK has those ALooper APIs and my question is if those can be used to run a modal event loop on the C/C++ side so that there won't be an ANR.
AFAICS, the NativeActivity samples do exactly that. Their main loop is based on ALooper.
Now the question is if this is also possible for non-NativeActivity-based apps. That would be a nice workaround for the fact that it's impossible to run a modal loop on the Java side.