I would like to intercept the Android\'s OS incoming call screen and replace it with my app\'s incoming call screen. However, there is no API to do so, but I know for sure it is
I guess you might have done 95% of the work. The problem of your screen not showing up but the system incoming call could be solved like this :
Can an activity receive an unordered broadcast(incoming call) intent before system's default receiver?
You will have to overlay the native screen with a control(maybe a dialog box) when you get android.intent.action.PHONE_STATE as ringing.
You have to register a BroadcastReceiver for the action android.intent.action.PHONE_STATE.
The receiving intent will have a variable TelephonyManager.EXTRA_STATE_RINGING which will have the current state.
Let me know!
You need to intercept broadcast android.intent.action.PHONE_STATE
with highest possible priority, then if in your BroadcastReceiver.onReceive()
you will cancel broadcast through BroadcastReceiver.abortBroadcast()
you will be able to stop default incoming call screen to be shown, since default application won't receive incoming call broadcast. After that you're free to show your own Activity
.
At least the same strategy works with incoming SMS' - I used to do as described above.