I want to launch my customized screen when user dials any number from my android app instead of default caller screen.
See Question&Answers more detail:osI want to launch my customized screen when user dials any number from my android app instead of default caller screen.
See Question&Answers more detail:osGenerally speaking, in order to know how to override any default Activity, first you need to know the structure of the Intent that can launch the Activity.
Determining the structure of the Intent
If the Activity can be overridden, you should see a log entry with "START...", copy that entry so that you don't lose it in the log. On my device, this entry was:
START u0 {act=android.intent.action.CALL dat=tel:xxxxxxxxxxx flg=0x10000000 cmp=com.android.server.telecom/.CallActivity (has extras)} from uid 10088 on display 0
This Intent is made up of
Now you need to check if this Intent can launch the default dialer without specifying the component.
Checking if a default Activity can be overridden
If it launches the dialer, then, voila. You should be able to create an IntentFilter for your application, setting the action and the data appropriately. Then, the next time the user tries to make a call, it will ask the user which app they want to use.