I have created Broadcast receiver
<receiver android:name=".IncomingBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE"></action>
</intent-filter>
</receiver>
declared it in manifest file and On receive of the broadcast receiver i have called an activity to display in front of the default call screen.
But The default call screen pushs my activity backwards. Is there any option to make activity foreground by replacing default call screen .
One more question , in Contacts of android an gif image can be assigned as an contact icon to a contact. But on Receiving the call, the Gif image won’t get played. It is still.
Do you know the reason?
You cannot replace the call screen, you can only detect that you’re no longer on top (via
onPause()oronWindowFocusChanged()and start your activity again if you’re no longer on top.“One more question” is really not appropriate for stackoverflow — making one more post with the new question is how to ask something else which is unrelated. The reason your Gif is not animated though would be simply — Google didn’t provide support for animated Gifs on the call screen, but since you’re placing your own activity in front of it, you can obviously change that.