Here is the scenario. When the screen goes blank or if returning to an activity from outside the application (phone call, multitasking) I want to be able to call a function in the onResume() function.
I don’t want this function called if I used the back button from within the same Application. What I am doing is requiring the person to supply sensitive credentials again if they return to the app from outside sources.
I feel like the answer may lie with intent filters but I have not found anything doing exactly what I need.
you can start your activities with startActivityForResults and override onBackPressed for other activies to return a specific result.
catching the results you’ll know if a back button was pressed.