Just to answer my own question now after so much time (since CommonsWare commented on the most popular answer telling we should NOT do this):
When I want to quit the app:
FLAG_ACTIVITY_CLEAR_TOP
(which will quit all the other activities started after it, which means - all of them). Just make to have this activity in the activity stack (not finish it for some reason in advance).finish()
on this activityThis is it, works quite well for me.