I am trying to create an app that functions like skype. When you have skype installed and try to make a call, after pressing the CALL_BUTTON, it will ask the user to choose which service to use (“Complete action using” >> Dialer or Skype).
I am hoping to add another option that would call my activity. I have been using intent-filters on xml but it doesn’t seem to work.
<activity android:name=".OutgoingCallActivity">
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Anyone can provide me some snippet of their code? Thanks you so much.
You will have to catch the broadcasted message:
<receiver android:name=".your.receiver"><intent-filter android:priority="-1">
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>
In there you can decide weather you want to open a window or not and choose to block the broadcast proceeding to other receivers.