0

I building an app which need to get some information from some web site everyaday in 12:00 PM and send it to the user as a notification. The function runs automatically when the app is on but I don't want the user to launch the app so the function can run, I want it to happen automatically. how can I do this?

Thanks in advance

Dariv
  • 7
  • 1
  • 3

1 Answers1

1

You can use Alarm manager for that.

here is a good example of using:

link

And developers for more info:

link 2

Community
  • 1
  • 1
SacreDeveloper
  • 1,253
  • 1
  • 9
  • 16
  • thanks. but does it wake the whole app automatically or can it run only the function I want in background without the user being noticed as it runs? – Dariv Apr 28 '14 at 11:17
  • You can use the alarm manager to wake up your application service, and then you can put there your code, or let your alarm manager wake up your application. dont forget to accept answer if its help :) – SacreDeveloper Apr 28 '14 at 11:21