For JME3 devs: general JME App closing, android activity destroy/start :

There are only two problems in fully restarting a JME Android Application. Some will say I shouldn’t have to restart a jme App, but never say never.



JmeSystem.setSystemDelegate(new JmeAndroidSystem()); in Android harness shoudn’t be a static call, but rather be done in the oncreate() method.



a simple :" assetManager = null;" should be done in Application stop here:



public void stop(boolean waitFor){

logger.log(Level.FINE, “Closing application: {0}”, getClass().getName());

context.destroy(waitFor);

assetManager = null; <


}


Cheers to the JME team :)

Kine

Not really, no. Your solutions are not going along the intended logic. Whats the exact issue you have that you circumvent with these workarounds?

I have to manage multiple activities. Android manages the background actvities and decides to close them in case there’s no memory left. In case the Jme actvity has been shuted down, it cannot be re-opened from the same Android App,

The issue I had was that when I launched the Jme activity for the second time, I had a blank screen,the main loop was running: no textures where loaded,



Kine

I have not had any issues with this so far. When I hit the HOME button and go do other things, the next time I start the app, either the game resumes (Android did not kill the app due to needed memory) or the game starts fresh from scratch (Android killed it at some point).



In both cases, the graphics and app run fine.



However, I have not tried multiple android activities. I’m not sure why that would matter though.