I use AlarmManager to restart my service, code is:

AlarmManager aman = (AlarmManager)getSystemService
(Context.ALARM_SERVICE);
PendingIntent pi = PendingIntent.getBroadcast(this,0, new Intent
(this,BootCompleteReceiver.class), 0);
aman.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis()+(1000)*5,
pi);
this.onDestroy();

after 5 seconds, BootCompleteReceiver will startServcie(), but only
see onStart() not onCreate() calls. Is the way of destroying the
service wrong? Thanks.

BootCompleteReceiver is written in AndroidManifest.xml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to