android - BroadcastReceiver before Activity onPause()? -
when on activity , incoming call coming, send parameter broadcastreceiver receives call activity before onpause() starts. possible ? suggest me alternative ?
in tests, activity.onpause() starts before broadcastreceiver.
i've tried use internal broadcastreceiver in activity , external 1 can't achieve this.
here little schema of problem.
thanks
did try use telephonymanager listen phonestatelistener linstening phone state change ?
oncallstatechanged(int state, string incomingnumber)
callback invoked when device call state changes.