Android: How to show a list of dialer app installed on my device instead of directly calling default dialer

Android: How to show a list of dialer app installed on my device instead of directly calling default dialer

Intent intent = new Intent(Intent.ACTION_CALL);
startActivity(intent); 

permission -

<uses-permission android:name="android.permission.CALL_PHONE" /> 

So with this code the deault dialer app gets called. I want the behavior where Android suggest me the list of apps that could be used for calling feature.

Answers


You can not show list of dialer while using ACTION_CALL intent.

You need a special permission because the ACTION_CALL is a protected action, allow you to call a phone number directly, with no interaction from the user.

You can make Intent chooser for ACTION_DIAL intent which allows you to show list of apps which has dialer. You can use this code.

final Intent intent = new Intent();
intent.setAction(Intent.ACTION_DIAL);
intent.setData(Uri.fromParts("tel", "123456", null));
startActivity(Intent.createChooser(intent, ""), REQUEST_CODE));

I hope it helps!


Need Your Help

How to order search results by relevance and another field in Lucene.net

.net search .net-3.5 lucene lucene.net

I have a requirement to sort search results by relevance and another field.

flash plugin for phonegap

javascript html css cordova

I am developing one application in html,css,javascript in phonegap. in that application i need a flash plugin coding for javascript to enable audio/video for my application purpose if anybody know ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.