I have an application that uses a Native pthread to run a long running task and I have a background service without notification keeping a reference to the thread through JNI.
When the service is destroyed I lose the reference to the pthread.
I would like to store this in a static / Singleton so it survives the service being stopped. My question is : when does the JVM die? Does android recreate a JVM when it restarts the service?
Thanks