android - How to ensure onStop() method gets called when phone call is received using Lollipop -


I've got some legacy code which I'm working on onStop () my activity Method for When I put the app in the background using the Home button, then onPause () after the onStop () methods trigger both non-lollipop and lollipop devices , And I get to clean up my activity on non-lollipop devices when I get a phone call, then onPause () - onStop () Methods are called, and I hope that my activity should be cleared, however, using the lollipop, only the onPause () method is accepted upon receipt of a phone call is.

Has anyone seen this, and there is a work around it? Thank you.

Register BroadCastReciever for an incoming call intent and do it in < Code> onRecieveIntent Although there is only one workaround, but all cases and all OS versions will be tricked.


Comments