when user start make call, android propose to choice, which app can be using to make call (like Skype). Simple question – how my app can be in that list and how i can get number, which user was put in system dialer?
i was do a all issues, which suggest in both answers, but still, if customer press call on phone dialpad, i still seen :
make call with:
– skype
– phone
and there is no my app inside list.
EDITED
now problem is solved for that code, now my app in list and opened as well: (was wrong > symbol)
<activity
android:name=".PhonePadActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.CALL" />
<data android:scheme="tel" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
</intent-filter>
</activity>
Second part of problem – get phone number, which user was dial in standard dialpad, still not solved:
that code inside onCreated:
Intent intent = getIntent();
String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
Toast.makeText(this, "Call was made to-->>" + number, 5000).show();
gives null.
SECOND EDITION
Last time i was received from Google notification that they are restrict CALL_PRIVILEGED (bcs we are not support emergency calls for them.) Without CALL_PRIVILEGED my app not in list again. Anybody know a fresh solution for that thing? I’m now discussed with google support regarding that issue, we got some iterations without success for now.
Declare your Activity as to add it in option list for calling application
and for calling to any Number use
Intent.ACTION_DIALas :