i am developing an android app to show notifications.How can i poll a webservice at finite interval (say 10 min interval) to check for any update and show as notification in android notification panel.
You do not need a service. I feel like a broken record. In this use case a service will sit there for 95% of the time doing nothing but still using system resources and more importantly drain the battery.
Please see my answer on a similar question that uses an Alarm from the AlarmManager:
Running task periodicaly(once a day/once a week)
Edit:
Look at this tutorial from the Android Development site for how to implement notifications: http://developer.android.com/guide/topics/ui/notifiers/notifications.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With