Rich, I think the issue is that Android apps (like iOS apps) are not supposed to have and Exit option. Not that it cannot be done.
In some apps, it might be okay to just close the app if the 'home' button is pressed (I'm going to write a quick app to see if that does produce the expected results). But others, like games or editing things, might be a problem if they just closed.
The issue appears to be the way Android apps work. They run lots of processes to do different things. And it is important that a closing app closes all the processes properly.
Now, the End call in Tier 1 might just do the right stuff, but I cannot find the code that executes in the agk files.
In the interpreter code reference to a function AppForceExit() which closes an app based on platform (does nothing in iOS) which I based my agk::closeThisApp() function for my code and templates. For the Android, it calls something called agk::MasterReset() and the exit(0). I know that exit(0) causes the app to close, but I don't know if it does it 'properly'. I don't know what MasterReset() does, since I cannot find it. Hopefully, it does clean up functions.
void app::closeThisApp()
{
// completely exit the app
#ifdef AGKWINDOWS
PostQuitMessage(0);
#endif
#ifdef AGKIOS
// forcing a quit in iOS is against recommended guidelines - use HOME button
// the exit button is disabled on AGKIOS builds
// but if you want to do so, this is the code
//agk::MasterReset();
//exit(1);
#endif
#ifdef IDE_ANDROID
// similar to iOS, an exit button should not be done
// but if you want to do so, this is the code
//agk::MasterReset();
//exit(0);
#endif
#ifdef IDE_MEEGO
g_appptr->quit();
#endif
#ifdef IDE_MAC
glfwCloseWindow();
#endif
#ifdef IDE_BADA
// Bada platform has a HOME button to quit apps
// but the END command can also quit a Bada App forcefully
//Application::GetInstance()->Terminate();
#endif
}
Cheers,
Ancient Lady
AGK Community Tester