Yes, the default behaviour of back button press would result in calling Activity.finish, but that would not unload JUCE lib and that would not close the app completely.
Rather than using a default behaviour in Java, we give people opportunity to decide what they want to do, by calling
JUCEApplicationBase::backButtonPressed() in C++. If you then called
JUCEApplicationBase::backButtonPressed(), it would result in calling Activity.finish, which would be exactly the same behaviour as Java’s default. This is not a hack, just an extra step to allow you to do something else if you wish, but you could just say “Yes, I want to quit the app”.
Then, the problem with that was that calling Activity.finish does not really close the app, and Juce lib does not get unloaded. When a user comes back to the app from recent apps list, assertions will be hit in JUCE because we try to initialise the app again, while the previous instance app has not been fully closed. This is why I added code to fully exit the app. So now if you call
JUCEApplicationBase::quit(), it will really quit the app.
To summarise, call
JUCEApplicationBase::quit() in your
JUCEApplicationBase::backButtonPressed() if you want to close the app. That will instruct Java to finish the activity, but it will also fully close the app.