GMoN
Dauergast
- 394
Wie kann man denn z.B. das Notification Icon vom Service ändern, wenn er schon läuft? läßt sich das dann überhaupt noch ändern? Denn ich kann diese Notification ja auch nicht canceln, solange er noch läuft. Ich würde aber gerne zur Laufzeit bei bestimmten Ereignissen die Farbe des Icons ändern.
Code:
private void showNotification() {
CharSequence text = "G-MoN scanning is activ";
Notification notification = new Notification(R.drawable.service1, text,
System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
new Intent(this, de.carknue.gmon2.gmon.class), 0);
notification.setLatestEventInfo(this, "G-Mon", text, contentIntent);
notification.flags |= Notification.FLAG_ONGOING_EVENT;
startForeground(0x7f0a0036,notification);
}