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?

No correct solution

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top