|
|
@ -6,7 +6,6 @@ import android.app.Service; |
|
|
|
import android.content.Intent; |
|
|
|
import android.content.Intent; |
|
|
|
import android.os.Binder; |
|
|
|
import android.os.Binder; |
|
|
|
import android.os.IBinder; |
|
|
|
import android.os.IBinder; |
|
|
|
import android.support.v4.app.NotificationCompat; |
|
|
|
|
|
|
|
import android.util.Log; |
|
|
|
import android.util.Log; |
|
|
|
|
|
|
|
|
|
|
|
public class ForegroundService extends Service { |
|
|
|
public class ForegroundService extends Service { |
|
|
@ -72,7 +71,7 @@ public class ForegroundService extends Service { |
|
|
|
new Intent(this, I2PD.class), 0); |
|
|
|
new Intent(this, I2PD.class), 0); |
|
|
|
|
|
|
|
|
|
|
|
// Set the info for the views that show in the notification panel.
|
|
|
|
// Set the info for the views that show in the notification panel.
|
|
|
|
Notification notification = new NotificationCompat.Builder(this) |
|
|
|
Notification notification = new Notification.Builder(this) |
|
|
|
.setSmallIcon(R.drawable.itoopie_notification_icon) // the status icon
|
|
|
|
.setSmallIcon(R.drawable.itoopie_notification_icon) // the status icon
|
|
|
|
.setTicker(text) // the status text
|
|
|
|
.setTicker(text) // the status text
|
|
|
|
.setWhen(System.currentTimeMillis()) // the time stamp
|
|
|
|
.setWhen(System.currentTimeMillis()) // the time stamp
|
|
|
@ -85,4 +84,4 @@ public class ForegroundService extends Service { |
|
|
|
//mNM.notify(NOTIFICATION, notification);
|
|
|
|
//mNM.notify(NOTIFICATION, notification);
|
|
|
|
startForeground(NOTIFICATION, notification); |
|
|
|
startForeground(NOTIFICATION, notification); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|