Android Back Button
Posted: Tue Jul 11, 2017 9:18 am
When a user presses the back button on Android, the app disappears as expected, however when the app is restarted the gui is not being rendered, yet it works fine when change task back and forth.
At the end of the code after my loop is finished and the app exits (after back pressed), if I use the following then the app is properly destroyed and when restarted its starts as if fresh. But, I always get a msg stating the "app has stopped running"
Any tips on what to do please?
I understand that an app shouldn't really be closed other than by the system itself.
Am I supposed to use "android_app" struct to access "something", etc...
Cheers
At the end of the code after my loop is finished and the app exits (after back pressed), if I use the following then the app is properly destroyed and when restarted its starts as if fresh. But, I always get a msg stating the "app has stopped running"
Code: Select all
... a_main(android_app* app=NULL) ...
...
if(app){
delete app;
app = NULL;
}
I understand that an app shouldn't really be closed other than by the system itself.
Am I supposed to use "android_app" struct to access "something", etc...
Cheers