Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App: add action button to persistent notification #368

Closed
wants to merge 1 commit into from

Conversation

kari-ts
Copy link
Contributor

@kari-ts kari-ts commented May 3, 2024

-Only show notification if connected
-Tapping persistent notification takes you to the app
-Tapping action button disconnects without taking you to the app
-Disconnecting dismisses the notification

Updates tailscale/tailscale#10104

-Only show notification if connected
-Tapping persistent notification takes you to the app
-Tapping action button disconnects without taking you to the app
-Disconnecting dismisses the notification

Updates tailscale/tailscale#10104

Signed-off-by: kari-ts <kari@tailscale.com>
@kari-ts kari-ts requested a review from oxtoacart May 3, 2024 23:08
@oxtoacart
Copy link
Contributor

I found a few issues in testing.

  1. When I tap on the notification, it takes me back to whatever view I had open in the Tailscale app. I think it would be best to open the home screen.

  2. When I tap on the notification, it dismisses the notification, even if I didn't disconnect. I think the notification should remain as long as Tailscale is on.

  3. When I tap "disconnect", it does disconnect Tailscale, but the notification is not dismissed.

  4. If I disconnect Tailscale from the Tailscale UI, the notification remains. It should disappear.

@oxtoacart
Copy link
Contributor

IIRC, what I did the last time I had something like this, I ended up using a bound foreground service along with the VPN. Something like this. The foreground service gets a persistent notification that sticks around as long as the service is running. Binding it to the VPNService makes the service go away when the VPN is stopped. And the nice thing about having a foreground service running is that it should make it less likely for the our app (and hence the VPN) to be killed.

@kari-ts kari-ts closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants