Hi,
 You can use the AlarmManager for such tasks.

Sample Code:
==========

AlarmManager am = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
PendingIntent pi = PendingIntent.*getBroadcast*(getApplicationContext(),
REQUEST_CODE, intent,      PendingIntent.FLAG_CANCEL_CURRENT);
am.set(AlarmManager.RTC_WAKEUP, SOME_TIME_IN_FUTURE, operation);

The flag AlarmManager.RTC_WAKEUP will cause the device to wake up. You can
also try the AlarmManager.ELAPSED_REALTIME_WAKEUP flag.

Best Regards,
Pradeep Kaushik

On Fri, Aug 7, 2009 at 10:50 AM, [email protected] <
[email protected]> wrote:

>
>
> Maybe I was misunderstood. What I want is to continue my notification
> effect even the device has once shut down, just like an alarm clock.
> If you really get it, please explain it for in detail? Thanks a lot!
>
> On 8月6日, 下午4时52分, peter <[email protected]> wrote:
> > Set flag of Notification, there have sort of flag to let your
> > notification show
> >
> > like this:"Notification.flag = Notification.FLAG_AUTO_CANCEL"
> >
> > On Aug 6, 4:42 pm, "[email protected]" <[email protected]>
> > wrote:
> >
> >
> >
> > > Hi all,
> > >     I have an application with notification. I want to keep the
> > > notification working even if the device once shut down just like an
> > > alarm. Could anyone give me some sample code to help me?
> > > Thank you in advance!- 隐藏被引用文字 -
> >
> > - 显示引用的文字 -
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to