How to get app name of default dialler running on my phone. #9987
-
I have created a bash script which reads notifications with command so, Im using mi phone which has So how can I get default dialler app ...
if [[ $packageName == "com.android.incallui" ]]
then
... It should be like ...
if [[ $packageName == "[Default dialer app name]" ]]
then
... What ever the default dialer user use , [Default dialer app name] should be the name of the app which will receive calls. ...
if [[ $packageName == "com.google.android.dialer" ]]
then
... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
For android You may get an array if more than one app assigned the role. For android https://android.stackexchange.com/questions/227155/retrieve-list-of-default-apps-via-adb You can get android version with |
Beta Was this translation helpful? Give feedback.
For android
>= 10
, grant termuxDUMP
permission withadb shell pm grant com.termux android.permission.DUMP
and then run/system/bin/dumpsys role | grep -A 1 android.app.role.DIALER | grep holders= | sed -E 's/[ \t]+holders=(.*)/\1/'
You may get an array if more than one app assigned the role.
For android
< 10
you can runcmd package resolve-activity tel://123456
with adb or root.https://android.stackexchange.com/questions/227155/retrieve-list-of-default-apps-via-adb
https://cs.android.com/android/platform/superproject/+/android-12.0.0_r32:packages/modules/Permission/service/java/com/android/role/RoleService.java;l=735
https://cs.android.com/android/platform/superproject/+/android-12.0.0_…