1

I have the source code of a 'Phone' app that dials a number and makes a call. How do I make it visible in a list of available applications when a person chooses any 'Phone' shortcut?

I have tried implementing the action intent filters android.intent.action.CALL and android.intent.action.CALL_PRIVILEGED but it only shows my app in the list AFTER I dial a number. In other words, my app gets classified as a Dialer rather than a Phone.

Is there any specific BroadcastReceiver that I need to implement? How do I do that?

Kara
  • 6,115
  • 16
  • 50
  • 57

2 Answers2

1

I believe this answer is probably what you're looking for. So essentially you'll first need to setup an intent filter on the activity that's going to make the call (in AndroidManifest.xml):

<intent-filter>
    <action android:name="android.intent.action.CALL" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="tel" />
</intent-filter>

This should give your user the option to use your app when placing calls, similarly to how csipsimple works.

Community
  • 1
  • 1
Marvin Pinto
  • 30,138
  • 7
  • 37
  • 54
  • I have already done that. However, doing so shows my app in the list of Dialer apps, not phone apps. My app only contains a set of number buttons and a textview. The user enters the number and clicks the Call button, which then fires an ACTION_CALL intent to call that particular number.. If I add a filter for android.intent.action.CALL then when I press the Call button in my app, a list appears with the stock Dialer AND my app in it.. – Girish Kamath Jan 28 '12 at 07:01
0

well since my comment was what the OP asked for, i replicate it here.

"have you tried CALL_BUTTON (as an intent filter in your manifest) ?"

STT LCU
  • 4,348
  • 4
  • 29
  • 47