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

    From Marion@21:1/5 to All on Sun Apr 27 07:06:04 2025
    If you have ideas for how to create dialer shortcuts, please advise.

    The topic came up minutes ago in this cross-reference message below:
    *How to make custom one-tap shortcuts to phone numbers in Android*
    <https://www.novabbs.com/computers/article-flat.php?id=58704&group=comp.mobile.android#58704>

    Where I think billions of people could benefit if we, together, as a team,
    can write up a tutorial for how anyone on Android can create a one-tap
    shortcut that dials any given person, where they can put those shortcuts
    into a homescreen folder, perhaps with their photo as the shortcut icon.

    My first question is has anyone on this newsgroup already done it?
    (Because if you have, then just let us know how you did it please!)

    If nobody has already done it, then here's my first swag at how to do it.
    (This is copied, verbatim, from the referenced post, as a starting point.)

    What we might be able to do is craft a one-tap shortcut to the phone number
    if we can figure out the "Intent" syntax, which would be useful to billions
    of people (since everyone needs a one-tap dial shortcut from time to time).

    "Hey Android, dial this phone number: tel:1.555.123.4567."
    (Action: ACTION_DIAL, Data: tel:1.555.123.4567)

    The critical piece we need to figure out is how to craft an "Intent" with
    the "Action" of "Intent.ACTION_DIAL" and a specific "URI" to the desired
    phone number of the format "tel:15551234567".

    Maybe I'll test it out since BILLIONS of people could use that tutorial.
    But it might take a while as it's not something in my already long todo.

    Here's some quick pseudocode though... for what I think needs to be done.
    Create Intent
    Action: android.intent.action.DIAL
    Data URI: tel:15551234567
    Package: com.samsung.android.incallui
    (or com.android.dialer or com.google.android.dialer)
    Class (Activity): com.android.dialer.DialtactsActivity
    (or com.google.android.dialer.extensions.GoogleDialtactsActivity)

    The beauty of a one-tap shortcut is you can treat it like any other
    shortcut. It can be in folders. It can have any icon you like.
    --
    Note a widget is not the same thing as a one-tap homescreen shortcut.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marion@21:1/5 to Marion on Sun Apr 27 07:42:19 2025
    On Sun, 27 Apr 2025 07:06:04 -0000 (UTC), Marion wrote :


    Where I think billions of people could benefit if we, together, as a team, can write up a tutorial for how anyone on Android can create a one-tap shortcut that dials any given person, where they can put those shortcuts
    into a homescreen folder, perhaps with their photo as the shortcut icon.

    Since the need is so obvious, the first quest in creating a one-tap
    shortcut to any phone number would be to search to see who has done it.
    <https://google.com/search?q=%2BIntenet+%2BAndroid+-Widget+%22how+to+add+direct-dial%22+%2Bshortcut>

    Most of the hits confuse a Widget with a Shortcut unfortunately.
    In fact, almost everything confuses a Widget with a Shortcut.

    It's crazy. The search results are utterly useless as a result.
    I looked at scores of hits, but so far I can't find much on this.

    This may be promising as it uses a method I wouldn't have thought of.
    <https://developer.android.com/develop/ui/views/launch/shortcuts/creating-shortcuts>
    Specifically the section on "Create pinned shortcuts"
    <https://developer.android.com/develop/ui/views/launch/shortcuts/creating-shortcuts#pinned>

    That's for developers, but maybe it gives us the syntax we need?
    1. Create shortcuts.xml in your app's res/xml directory.
    2. Within the XML file, define the shortcut's title, icon,
    and the intent that will be triggered when the shortcut
    is tapped. The intent should be an intent to launch the
    dialer with the phone number of the desired contact.
    3. Ensure your app includes the necessary dependencies
    for the Google Shortcuts Integration Library and
    for ShortcutManagerCompat.

    The code below demonstrates how to create an intent
    to dial a phone number programmatically:
    Intent callIntent = new
    Intent(Intent.ACTION_DIAL);
    callIntent.setData(Uri.parse("tel:" + phoneNumber));
    startActivity(callIntent);

    Given people don't know the difference between a widget and a shortcut, a search isn't working like it should be working, at least not for me.

    I'll have to run some empirical tests, where Intents are, I think, the only
    way to go, but I'm hoping to find SOMEONE on the planet who is ahead of us.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marion@21:1/5 to Marion on Sun Apr 27 09:02:53 2025
    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>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marion@21:1/5 to All on Sun Apr 27 10:27:11 2025
    This will create a "two-tap shortcut" to dial any number
    on my Samsung Android 13 phone (needs to be tested on others).

    1. Start "Intents" & populate as below & hit the "airplane" icon.
    <https://play.google.com/store/apps/details?id=krow.dev.scheme>
    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.

    2. In "Intents", go to the "History" tab & longpress that intent.
    In "Intents" your choices for that intent are the following:
    Execute intent
    Edit alias
    Copy uri text = tel:+18007435002#Intent;action=android.intent.action.DIAL;package=com.samsung.android.dialer;end
    Remove intent
    Create shortcut = give it a name "callpge" and press "OK"
    Favorite

    3. Start Intent Launcher & paste in that URI above.
    <https://play.google.com/store/apps/details?id=com.villevalta.intentlauncher>
    ACTION = ACTION_CALL
    Uri = tel:+18007435002#Intent;action=android.intent.action.DIAL;package=com.samsung.android.dialer;end
    Press the blue "LAUNCH" button
    Result: Permission Denial: starting Intent
    { act=android.intent.action.CALL dat=tel:xxxxxxxxxxxx
    cmp=com.android.server.telecom/.components.UserCallActivity }
    from ProcessRecord{dfa61ce26780:com.villevalta.intentlauncher/u0a535}
    (pid=26780,uid=10535) requires android.permission.CALL_PHONE

    The problem with creating an Intent, I think, is that almost no app is
    going to have permission to make the call. It's a permission thing.

    Apps that execute Intents can only set up the dialing of the number.
    ACTION = ACTION_DIAL
    tel:+18007435002#Intent;action=android.intent.action.DIAL;package=com.samsung.android.dialer;end

    So, for now, I'll create a two-tap shortcut in the next post, so that
    anyone can create a two-tap shortcut to call any desired phone number.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marion@21:1/5 to All on Sun Apr 27 11:39:41 2025
    Since we don't (yet) know how to add permissions for a one-tap "CALL"
    shortcut, we can only create a two-tap shortcut to "DIAL" a number.

    Note: Likely "Tasker" & "Automate" can probably actually DIAL,
    but I'll test things one at a time (hence they're for later).

    Here's how I just created a two-tap shortcut on my desktop
    (which, since it's NOT a widget, can be put into a folder).

    To create a two-tap shortcut to dial a specific number
    first install Quikshort Shortcut Creator, by AtolphaDev <https://play.google.com/store/apps/details?id=com.atolphadev.quikshort>

    1. Open Quikshort
    2. In "Categories" select "Shortcuts"
    3. Press "+ Create Shortcut"
    4. In "Choose Shortcut Type", select "Intents"
    5. In "Choose Intent Type", select "Create Custom Intent"
    6. Use the GUI to populate the custom intent with...
    Custom Action = Android.intent.action.DIAL
    Data = tel:+18007435002
    Package = com.samsung.android.dialer
    7. When satisfied, press the "-> Continue" button
    8. In the next GUI, you'll likely want to change the shortcut
    name from "Custom Intent" to something like "Call PG&E"
    9. To test, press "Try Shortcut"
    (This should bring up the number in your default dialer, but
    if you want to change the dialer, you can do that in step 8)
    10. Press the "checkmark" icon to create the desktop shortcut
    11. Press the "Add Automatically" button to add to the desktop
    12. Voila! Now you have a two-tap shortcut to "Call PG&E"

    If desired, you can create an entire folder of people to call.
    Each can have an icon of their own face, for example, if you like.

    Please test and let me know how it works for you.
    Obviously I only tested this on a Samsung Galaxy.

    You almost certainly will need to change the "Package" if
    you're on another device other than a Samsung phone.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marion@21:1/5 to Marion on Sun Apr 27 13:41:20 2025
    On Sun, 27 Apr 2025 11:39:41 -0000 (UTC), Marion wrote :


    Note: Likely "Tasker" & "Automate" can probably actually DIAL,
    but I'll test things one at a time (hence they're for later).

    Well, something isn't working when I created the one-tap shortcut.
    But it "should" work. So maybe it will work for others on the team.

    Here's what I did.

    I had com.llamalab.automate version 1.40.3 (230) so I updated to the latest
    <https://play.google.com/store/apps/details?id=com.llamalab.automate>
    which is version 1.47.0 (251) and I granted it "CALL PHONE" permission.

    I loaded a random flow from the community from within Automate
    "Notification History" created by Pete Glass
    And I created a homescreen shortcut, which worked just fine.

    This "should" have worked just as well, but it just starts & stops.
    1. Launch Automate
    2. Tap the "+" button to create a new flow
    3. Tap on "Flow beginning" & title it "Call PG&E"
    4. Tap the "+" button to create a new block
    5. In the "Search blocks" form, find & expand "Telephony"
    6. In the expanded results find & click on "Call number"
    7. Click on the resulting "Call" block to add the following
    Phone number = +18007435002
    Subscription id = #1 T-Mobile
    SIM slot = #1 T-Mobile
    Flags = [_]Start with RTT, [x]Start with speakerphone
    8. Press the "Save" at the top
    9. When you press on "Flow Beginning" there is a button for
    Install Home Screen Shortcut.
    10. Pressing that makes a shortcut which "should" make a phone call.

    For me, it just starts, and stops.
    So something is wrong.

    But if you test it, let me know if it works as it should just work.
    The result should be a one-tap shortcut that calls a number.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)