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
Default dialer: Phone, Skype, Linphone, etc
Moderator: Martin
Re: Default dialer: Phone, Skype, Linphone, etc
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.
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"))
}
Re: Default dialer: Phone, Skype, Linphone, etc
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
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
Re: Default dialer: Phone, Skype, Linphone, etc
You can change android.intent.action.DIAL to android.intent.action.CALL to get (com.android.server.telecom) and maybe Linphone.
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
Try action start activityor 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.
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
Re: Default dialer: Phone, Skype, Linphone, etc
Thanks, that worked perfectly!!