ihtkwot
ihtkwot

Reputation: 1252

How to send a notification when website updates in Android?

I am trying to write an application for Android that functions as a service in the background that will pop up a notification in the notification bar whenever a website is updated. It is basically an RSS feed but as a service.

Any ideas on how best to do this?

***EDIT*** This is a good example of the code that I was looking for which Mark Allison mentioned. http://osdir.com/ml/AndroidDevelopers/2009-03/msg03779.html

Upvotes: 1

Views: 4482

Answers (1)

Mark Allison
Mark Allison

Reputation: 21924

There are a number of ways you could achieve this:

  1. If you control the web server, you could post updates to registered apps using CD2M.

  2. You write an Android Service which uses AlarmManager to wake it up periodically. Then you can use the HTTP If-Modified-Since header to determine whether a page has changed without downloading it.

  3. You do a hybrid of the two methods. You write a server which monitors a third-party website as per option 2, and then wakes your app using C2DM as per option 1.

Upvotes: 3

Related Questions