1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-30 11:18:12 +00:00

now if you tap on the notification it goes to the SimpleSSHD main

activity so you can conveniently stop the service
This commit is contained in:
Greg Alexander 2016-10-16 15:13:22 -04:00
parent 34afb9e4f2
commit 14a9812c85

View File

@ -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);
}
}