문제

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