Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

How to launch a service/broadcastreceiver in a real application?

I'm working on a very simple android application with which the user can add and remove elements to/from a local sqlite database. This part is done.

Now, I'd like to create a program running in the background, checking the database periodically (maybe once an hour) and sending notifiations to the user even if the frontend is closed. I also need to start this background program on the phone's startup. (so very similar to lets say an emailing app. Its always checking your mails even if the user have not started the app)

What should be this background app: a service? A broadcastreceiver? something else? How should I start it? I'm pretty confused about his question. How should I modify my manifest file?

Comments