I have a simple application with my own code. That is, the native Activity code is a plus.
When activity is entered in the background, I save my own code to do some processing. The problem is that the activity is killed by the OS (due to low resource), the JNI code does not seem to know what happened in the Java lands, and is still doing its job, so it is wasting resources. Why does Android only kill activity instead of the whole process? and in this case, how does the native code know that the activity has been killed? OnDestroy () cannot be called.
source
share