I am porting over an application that has been written already in C++ to run on Linux that now needs to run on an Android device. It is a GPU intensive app that makes OpenCL calls, running a set of tests. These could take up to several hours or days to finish running.
I have a Java Activity that reads in some basic input, then passes that to the JNI.
It runs fine for shorter operations, but beyond several seconds it will pause; I can unpause it and it will continue to run, but then it hangs heavily every hundred or so operations (taking a minute for what should take less than a second).
Is there something I am lacking in Android knowledge, some critical fallacy I've overlooked that might be causing this? Would it make more sense to move all of the code to a NativeActivity? Or do I just need to make calls back to Java to display something every so often to prevent the OS from shutting me down?
Thanks to any who have the patience to answer my questions