ich habe einen Service. Dort habe ich im OnCreate folgendes definiert:
1mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
2 notification = new Notification(
3 R.drawable.icon,
4 "Dies ist eine Testnachricht",
5 System.currentTimeMillis());
6startservice();
2 notification = new Notification(
3 R.drawable.icon,
4 "Dies ist eine Testnachricht",
5 System.currentTimeMillis());
6startservice();
Und startservice sieht so aus:
1private void startservice() {
2 timer.scheduleAtFixedRate(
3 new TimerTask() {
4 public void run() {
5 mNotificationManager.notify(ReportsList.MESSAGE_ID, notification);
6 Log.d("DE-APP", "notified ?!");
7 }
8 },
9 1000,
10 10000);
2 timer.scheduleAtFixedRate(
3 new TimerTask() {
4 public void run() {
5 mNotificationManager.notify(ReportsList.MESSAGE_ID, notification);
6 Log.d("DE-APP", "notified ?!");
7 }
8 },
9 1000,
10 10000);
Allerdings sehe ich nirgends die Notification, was mache ich falsch ?!
Danke & Gruß Martin

