Re: How to make custom one-tap shortcuts to phone numbers in Android

Liste des GroupesRevenir à cm android 
Sujet : Re: How to make custom one-tap shortcuts to phone numbers in Android
De : marion (at) *nospam* facts.com (Marion)
Groupes : comp.mobile.android
Date : 27. Apr 2025, 10:02:53
Autres entêtes
Organisation : BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID : <vukrrs$2umj$1@nnrp.usenet.blueworldhosting.com>
References : 1 2
User-Agent : Alan Baker insisted this line can not be changed
On Sun, 27 Apr 2025 07:42:19 -0000 (UTC), Marion wrote :


Specifically the section on "Create pinned shortcuts"
 <https://developer.android.com/develop/ui/views/launch/shortcuts/creating-shortcuts#pinned>

Oh Jesus. The plot thickens. Not only are there Widgets to weed out, but
there appear to be three different kinds of shortcuts in Android land.

1. Static Shortcuts
2. Dynamic Shortcuts
3. Pinned Shortcuts

I think we want to create a pinned shortcut, i.e., an icon on our home
screen that, when tapped, directly initiates a call to a specific number.

The challenge is finding an app or method that allows us to create this
direct-dial pinned shortcut based on the Intent.ACTION_DIAL without going
through the standard widget route (because widgets are less useful).

In my case, since I don't have a contacts sqlite database, I can't simply
pull up the phone number so I have to be able to dial it directly in full.

Digging with Muntashirakon, I found this direct-dial alias on my Galaxy.
 "com.samsung.android.app.contacts/alias.DialShortcut"
which appears to be an "Activity Alias" within the Samsung Contacts app
that is maybe designed to handle the creation of direct-dial shortcuts.

Playing around with Muntashirakon and some of my intent debuggers,
I think this will dial immediately without the user needing to confirm:
 Action = android.intent.action.CALL
While I think this merely opens the dialer with the number already typed:
 Action = android.intent.action.DIAL
Where, for both, the rest of the Intent fields will likely be the same:
 Data URI = tel:+1.555.123.4567
 Package = com.samsung.android.app.contacts
 Class / Activity = alias.DialShortcut

Since "Intents" by krow.dev.scheme is designed for creating and launching
intents, I'll try that app first with my phone-specific Muntashirakon data.
 Action = ANDROID.DIAL = Android.intent.action.DIAL (to open the dialer)
 Action = ANCROID.CALL = android.intent.action.CALL (to call directly)
 URI / Data = tel:+15551234567 (replace with your desired number)
 Package Name = com.samsung.android.app.contacts
 Package Name = com.samsung.android.dialer
 Package Name = com.samsung.android.incallui
 Class Name = alias.DialShortcut

OK. The Alias.DialShortcut didn't work, but the entry below without it
almost worked perfectly in that it populated the dialer with anything I put
in the data field, where all had to do was hit the green dial button.

Let's try this final configuration:
 Action = ANDROID.DIAL = Android.intent.action.DIAL
 Package Name = com.samsung.android.dialer
 Class Name = (Leave this field blank)
 Data = tel:+18007435002
 Mime Type = (Leave this field blank)
 Extra = (Leave this field blank)
 Category = (Leave this field blank)
 Result = this populated the dialer; just hit the button.

 Action = android.intent.action.CALL
 Package Name = com.samsung.android.dialer
 Class Name = (Leave this field blank)
 Data = tel:+18007435002
 Mime Type = (Leave this field blank)
 Extra = (Leave this field blank)
 Category = (Leave this field blank)
 Result = No Activity found to handle Intent
 { act=android.intent.action.CALL dat=tel:xxxxxxxxxxxx
 pkg=com.samsung.android.dialer }

At this point, we're close because we can create a shortcut which is two
taps, not just one tap.
 1. The first tap brings up the dialer with the number populated
 2. The second tap dials that pre-populated number

I'll work on figuring out what the trick is to do both at once.
--
 <https://muntashirakon.github.io/AppManager/vi/>
 <https://play.google.com/store/apps/details?id=krow.dev.scheme>

Date Sujet#  Auteur
27 Apr 25 * How to make custom one-tap shortcuts to phone numbers in Android6Marion
27 Apr 25 `* Re: How to make custom one-tap shortcuts to phone numbers in Android5Marion
27 Apr 25  `* Re: How to make custom one-tap shortcuts to phone numbers in Android4Marion
27 Apr 25   `* Re: How to make custom one-tap shortcuts to phone numbers in Android3Marion
27 Apr 25    `* Re: How to make custom one-tap shortcuts to phone numbers in Android2Marion
27 Apr 25     `- Re: How to make custom one-tap shortcuts to phone numbers in Android1Marion

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal