From 14a9812c85513d0eca9aaee3c515ecf366942196 Mon Sep 17 00:00:00 2001 From: Greg Alexander Date: Sun, 16 Oct 2016 15:13:22 -0400 Subject: [PATCH] now if you tap on the notification it goes to the SimpleSSHD main activity so you can conveniently stop the service --- src/org/galexander/sshd/SimpleSSHDService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/galexander/sshd/SimpleSSHDService.java b/src/org/galexander/sshd/SimpleSSHDService.java index 4e957d8..e5e5328 100644 --- a/src/org/galexander/sshd/SimpleSSHDService.java +++ b/src/org/galexander/sshd/SimpleSSHDService.java @@ -1,6 +1,7 @@ package org.galexander.sshd; import android.app.Notification; +import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.content.Context; @@ -62,6 +63,9 @@ public class SimpleSSHDService extends Service { R.drawable.notification_icon, "SimpleSSHD", 0); n.tickerText = "SimpleSSHD"; + n.contentIntent = PendingIntent.getActivity(this, 0, + new Intent(this, SimpleSSHD.class), + PendingIntent.FLAG_UPDATE_CURRENT); startForeground(1, n); } }