Intercepting the ACTION_CALL intent on HTC sense

You may surprise but you are right. I have done so many experiment on this topic on HTC Desire and I found that HTC made some change either in Package Manager or added some wraper around that, so whenever we add activity which has action CALL then it is not added with ACTION CALL. They do this only for CALL action not for DIAL. To find out this I have done some experiments as:

1. Created an application registered with ACTION DIAL. So whenever there is a call to __ACTION_DIAL__ intent activity then HTC displays two options one for Dial its own and other is mine Activity. Another way to test for Dial is go to Call History in HTC phone and select any phone number or contact and select **Edit number before calling**. This will also display two option to choose one.

2. Since they disable the CALL feature by programatically, all other ways to call is done by interaction with UI of HTC. So I have found another way to call by programatically and that is use <action android:name="android.intent.action.CALL_PRIVILEGED" /> in my manifest file. But this time again due to their changes I am not able to handle Call action directly but another way to handle CALL is when the android look for ACTION_CALL_PRIVILEGED. And fortunately I found that. Just go to People -> View Contact. Then It shows the option to call. In HTC Desire there is Call mobile. So press and hold that option.

Bamm.. This time HTC shows the option to select one option to call. One is its own and another is, of course, my own.

Final conclusion is you can't handle CALL but CALL_PRIVILEGED in some cases only. To make sure Use skype application on your HTC and go to People -> View Contact and then press and hold Call mobile/home then this also shows the dialog to choose the handler for Call.