Skip to content

android: add shortcuts#677

Open
mahyarmirrashed wants to merge 1 commit intotailscale:mainfrom
mahyarmirrashed:feat/add-android-shortcuts
Open

android: add shortcuts#677
mahyarmirrashed wants to merge 1 commit intotailscale:mainfrom
mahyarmirrashed:feat/add-android-shortcuts

Conversation

@mahyarmirrashed
Copy link

Fixes tailscale/tailscale#16415

screen-20250716-221150.mp4

Fixes tailscale/tailscale#16415

Signed-off-by: Mahyar Mirrashed <mah.mirr@gmail.com>
@mahyarmirrashed
Copy link
Author

@kari-ts Could I get your review on these changes? Thanks :)

@tobiasmcnulty
Copy link

Is it possible to hide or disable the shortcuts if "Force enabled connection toggle" ("Prevents the user from disconnecting Tailscale." is enabled via the MDM managed configuration? (Full disclosure: I'm not a Tailscale developer.)

@mahyarmirrashed
Copy link
Author

@tobiasmcnulty Yes, I think so. However, you'd need to change it from static shortcuts (the way it is currently) to dynamic shortcuts. I haven't looked into it but it seems like it's just one library to do it: https://developer.android.com/develop/ui/views/launch/shortcuts/creating-shortcuts#dynamic
I can make it as a follow-up PR to this PR. I'd just like to get these changes merged first before putting more time to the second one.

@mahyarmirrashed
Copy link
Author

@barnstar Could I get your review on this please?

@asborisov
Copy link

Any new about this one. I would love to have this functionality merged

@mahyarmirrashed
Copy link
Author

Hi @sfllaw ! 👋 Hope you're having a good day!
Would you mind reviewing this PR, please? Thanks :)

@sfllaw
Copy link

sfllaw commented Oct 20, 2025

@mahyarmirrashed, thanks for the PR! I’m not an Android developer, so I can’t give a good review. But I’ll see if I can get someone to look at it. I can’t guarantee any timelines, though, so thank you for your patience.

@MulverineX
Copy link

It'd be really nice if this was a Toggle shortcut instead of Enable/Disable

@kari-ts
Copy link
Collaborator

kari-ts commented Feb 13, 2026

Thanks for submitting this, and apologies for the delay in looking at this. Here are a few thoughts:
-Agreed that this would be nice to have a toggle shortcut.
-Instead of creating two separate activities that broadcast to our receiver to enqueue to WorkManager, how about creating an activity as the shortcut entrypoint? We could keep IPNReceiver as the broadcast entrypoint and create a helper that enqueues the work?

@mahyarmirrashed
Copy link
Author

I'm comfortable with whatever @kari-ts , just let me know what changes to make. Do you want to compress it to a single toggle?

@MulverineX
Copy link

Yeah they're asking you to do that, also do you understand kari's request on implementation detail?

@mahyarmirrashed
Copy link
Author

Not entirely, it's been a few months since I touched this PR. From what I understand, is to create a helper that gets called instead of writing the code in the Activitiy class? There, we will take care of the toggle logic and enqueuing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Add Android App Shortcuts

6 participants