Wanna to implement own dialer activity, but don't know how to show chooser, 
where user can choose my app as dialer. Found billions link how to catch 
calls or open chooser like this: link 
<http://stackoverflow.com/questions/23211795/make-call-in-android-application-using-default-call-application>

But this not fits to me. Need only to show chooser dialer dialog without 
make call after choose. Just only choose default dialer.


I added uses permission to manifest:
<uses-permission android:name="android.permission.CALL_PHONE"/>


Also added a lot intent filters to activity:

<activity android:name=".TestActivity">
<intent-filter>
<action android:name="android.intent.action.DIAL"/>
<action android:name="android.intent.action.CALL_BUTTON"/>
<action android:name="android.intent.action.CALL_PRIVILEGED"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="tel"/>
</intent-filter>

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

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

<intent-filter>
<action android:name="android.intent.action.DIAL"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>

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

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


</activity>


I tried different ways, but cannot find right solution how to show chooser 
dialog, where user can choose default app for dial.
F.e:

Intent selector = new Intent(Intent.ACTION_DIAL);
selector.setData(Uri.parse("tel:5985780000"));
startActivity(selector);  - This not right, and not works - want only to 
show chooser, where user can choose app.  

Intent selector = new Intent(Intent.ACTION_DIAL);
startActivity(selector); - not works.

try {
Intent dial = new Intent(Intent.ACTION_DIAL);
dial.addCategory(Intent.CATEGORY_DEFAULT);
startActivity(Intent.createChooser(dial, "Choose dialer..."));
} catch (Exception e) {
Toast.makeText(StartTest.this, "Activity not found", 
Toast.LENGTH_LONG).show();
} - Not works


Will be glad any link or proposals.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/952673a0-824b-4bef-aa2f-de6db26b0577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to