Call stopSelf(). On Wed, Sep 30, 2009 at 3:09 AM, Alex Tang <tangli1987...@gmail.com> wrote:
> > 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 > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---