I have an app that receives and stores SMS messages. The main use is
to run in the background, although it does have a full GUI when
running in the foreground. I'm using a notification with the
FLAG_ONGOING_EVENT flag so users can tell the application is running,
even if it's in the background.
However, the user could easily close the app by viewing the main
screen and clicking the back button. The notification icon goes away,
but I would like to be able to warn the user that closing the app
would prevent it from capturing the SMS messages.
Is there any way to prompt the user if they really want to exit the
application when they hit the back button, and prevent the exit if
they say no? Or should I take a different approach?
And a bonus question: is there a way of receiving an SMS message, but
prevent it from passing on to, say, the Messenging app?
Is it correct that there is no way to change the actual icon of the
automatically created "more" menu item? I can see there is a
"android:moreIcon" option for Themes, but I can't get it to work, and
it looks like the MenuBuilder class actually has the internal theme