0

I have to schedule an event in Android. My event is starting a service and just doing the work in background even when the application is not running.

Can I do this even without Broadcast Receiver?

For starting the service, do I need Broadcast Receiver?

I saw some posts, only some of them used Broadcast Receiver :

How to start Service using Alarm Manager in Android?
Scheduling an event in Android
http://www.learn-android-easily.com/2013/05/android-alarm-manager_31.html
http://justcallmebrian.com/2010/04/27/using-alarmmanager-to-schedule-activities-on-android/

UPDATE:

From the posts that I read further, I realize that I have to use Broadcast Receiver if the app is not running at the time of event, but I don't need Broadcast Receiver if my application is running at the time of event. Please let me know if I have reached the right conclusion.

Community
  • 1
  • 1
Puneet Chugh
  • 93
  • 10

1 Answers1

0

You can use JobScheduler to achieve your requirements .

Mithun Sarker Shuvro
  • 3,902
  • 6
  • 32
  • 64
  • Thanks for the suggestion. But I want the event to occur at a particular time. So, I think my requirement would facilitate the use of Alarm Manager – Puneet Chugh Aug 17 '16 at 18:51