سؤال

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?

لا يوجد حل صحيح

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top