Java – How do I start an alert even after rebooting the device?

How do I start an alert even after rebooting the device?… here is a solution to the problem.

How do I start an alert even after rebooting the device?

How do I make my calendar event alarm wake up even after restarting my phone? (i.e.) if the current time is 10 a.m.; I set the alarm to 10:05 a.m. and now (10 a.m.) if I restart my device, the alarm should go off at 10:05 a.m. How to achieve this? I’ve created alerts for my calendar events. However, if I restart my device, the alarm will sound once I restart it. However, all other queued alerts are canceled. Thanks for any help and thanks in advance….

Solution

You can use BroadCaste Reciever because the device receives a broadcast when it switches

Turn it on so you can register for that broadcast, you can schedule your alarm clock in its receiver…

Here’s an example of how to do this, http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/

Related Problems and Solutions