All Android apps have a “Main” thread that handles all the UI. This is how the Android OS tests if an app is responsive or not. (see more here: Android Developers Blog: Painless threading )
I’m sometimes getting “Application Not Responding” on my app, which appears to be originating in java plugins, so I need to know a few things about Unity.
My questions are:
Which android thread does the Unity engine run on?
I know that all unity script code runs on a single thread; is this the same thread as the engine? Is it the “main” android thread?
When calls are made to native java android plugins, does it run the java code in a different thread? (It seems to be asynchronous as near as I can tell, but then it doesn’t make any sense to me how the java plugin could be on the main thread, as is shown in the ANR report)