In your case, try changing your code as follows:
<intent-filter android:priority="100"> <action android:name="android.intent.action.CALL_BUTTON" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>
It works for me if I click on the call button.
Try using the following code to intercept a call:
<activity> <intent-filter> <action android:name="android.intent.action.CALL_PRIVILEGED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
For HTC, some changes are there:
<activity> <intent-filter> <action android:name="android.intent.action.CALL_PRIVILEGED" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="vnd.android.cursor.item/phone" /> <data android:mimeType="vnd.android.cursor.item/phone_v2" /> <data android:mimeType="vnd.android.cursor.item/person" /> </intent-filter> </activity>
The intention with the action android.intent.action.CALL_PRIVILEGED is called up when calling from the phonebook as follows: Phonebook-> Contact-> Phone number Long click → Select a call from the drop-down menu.
source share