1

I am creating an Android app which is just a WebView for wrapping a news website. In this app I also want a process that parses an RSS feed every eg. 5 minutes. If there is a new post in that RSS then raise notification.

The question is, when the app is not running can the notification still be raised? If it's possible, how do I achieve this?

Daniel Scott
  • 1,787
  • 3
  • 12
  • 17
Dariel Pratama
  • 1,423
  • 2
  • 15
  • 37

1 Answers1

0

Start a service (Android Service) which polls the RSS feed checking for new posts.

From the Docs:

A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application.

When a new RSS post is found, use the Notification Manager to fire a new notification (from the Service).

Also, see this answer: Sending a notification from a service in Android

Community
  • 1
  • 1
Daniel Scott
  • 1,787
  • 3
  • 12
  • 17