Question

I have an app that makes very heavy image processing. My app process very low resolution of the image in the activity and i am intenting to make full resolution image processing in a Service so even if app is closed by user the processing and saving result would be done with service on the background. I have tried this and even my Service continues to run the JNI functions stop working when app is closed. I am not sure the real reason but i suspect that the native library is being unloaded when app is closed. So my question is how can i make JNI calls from a Service even if application is closed?

Pas de solution correcte

Autres conseils

Try using daemon. In that case, you can turn your java process into daemon and finish main one.

Take a look here:

https://github.com/mkowsiak/jnicookbook/tree/master/recipes/recipeNo022

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top