Default dialer: Phone, Skype, Linphone, etc

Post your questions and help other users.

Moderator: Martin

Post Reply
markd89
Posts: 17
Joined: 18 Apr 2014 16:08

Default dialer: Phone, Skype, Linphone, etc

Post by markd89 » 25 Jun 2019 00:24

I'm running Android 8.1

I'm looking for a way to check and change the default dialer.

If I click one of the Direct Dial shortcuts I have setup, it prompts me whether to use Phone, Linphone, Skype. I can also set Always for it not to ask me again.

I have a Flow where I want to dial using Phone, then set Android back so it prompts me the next time I use a Direct Dial shortcut.

Any tips much appreciated!

Thanks,

Mark

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Default dialer: Phone, Skype, Linphone, etc

Post by anuraag » 25 Jun 2019 01:23

This code will give you default dialer packageName
http://automagic4android.com/forum/view ... 15b#p24941

Below code can give you list of installed all dialers. You can use input dialog to create list then choose your desired dialer to dial.

Code: Select all

packageNames=newList();
intent=callJavaConstructor("android.content.Intent", "Intent(java.lang.String, android.net.Uri)", "android.intent.action.DIAL", callJavaStaticMethod("android.net.Uri", "parse(java.lang.String)", "tel:"));
resolveInfos=callJavaMethod(callJavaMethod(getContext(), "android.content.Context", "getPackageManager()"), "android.content.pm.PackageManager", "queryIntentActivities(android.content.Intent, int)", intent, 0);
for (resolveInfo in resolveInfos)
{activityInfo=getJavaField(resolveInfo, "android.content.pm.ResolveInfo", "activityInfo");
addElement(packageNames, getJavaField(getJavaField(activityInfo, "android.content.pm.ActivityInfo", "applicationInfo"), "android.content.pm.ApplicationInfo", "packageName"))
}

markd89
Posts: 17
Joined: 18 Apr 2014 16:08

Re: Default dialer: Phone, Skype, Linphone, etc

Post by markd89 » 25 Jun 2019 04:57

Thanks very much for your help!

I used your code and the input dialog shows:

com.android.dialer
com.skype.m2

However, when I dial from a Direct Dial shortcut there are three choices:

Phone
Linphone
Skype Lite

Can you see why Linphone would be missing?

The default data seems to be stored for app Call Management (com.android.server.telecom).

More detail: My plan is to have a Flow set the default dialer to Phone, use Call Number, End Call, then reset the default to none. This way the Flow will dial using Phone but when I use my Direct Dials, I will be prompted whether to use Phone, Linphone or Skype Lite.

or maybe a simpler approach: Is there a way to use "Call Number" and "End Call" and specify to specifically use com.android.dialer for these actions? Right now they use the default dialer.

Thanks again!

Mark

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Default dialer: Phone, Skype, Linphone, etc

Post by anuraag » 25 Jun 2019 08:08

You can change android.intent.action.DIAL to android.intent.action.CALL to get (com.android.server.telecom) and maybe Linphone.
or maybe a simpler approach: Is there a way to use "Call Number" and "End Call" and specify to specifically use com.android.dialer for these actions? Right now they use the default dialer.
Try action start activity
Set Action: android.intent.action.CALL
Set Data URI: tel:+91xxxxx
enable Explicit component and set packageName to com.android.server.telecom

Screenshot for example
2019-6-25_13-38-5.PNG
2019-6-25_13-38-5.PNG (159.96 KiB) Viewed 10682 times

markd89
Posts: 17
Joined: 18 Apr 2014 16:08

Re: Default dialer: Phone, Skype, Linphone, etc

Post by markd89 » 25 Jun 2019 14:28

Thanks, that worked perfectly!!

Post Reply