Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8574449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:28:37+00:00 2026-06-11T19:28:37+00:00

Hello I am building a news application in android, so that every time a

  • 0

Hello I am building a news application in android, so that every time a new data is entered into database user must receive a notification in the notification bar. So after research I found that I have to use broadcast receiver and alarm manager. But what I am not able to understand is that when the application is closed how it will know that a new data is entered? and how to make the alarm manager activate the application for checking new data let’s say every 5 minutes? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:28:38+00:00Added an answer on June 11, 2026 at 7:28 pm

    If I understand you correctly, you don’t need to run the whole application in order to check for new data, as it should be done in a separate background task.

    What you need is an alarm registered within AlarmManager and a BroadcastReceiver that will get invoked when the alarm is fired. The receiver checks for new data, and if the condition is met, it executes the intent that will start the notification activity.

    Please keep in mind, that if the database access requires more time, it’d better be done in a service started by the receiver.

    You can save some coding (and solve some common problems) by using cwac-wakeful ( https://github.com/commonsguy/cwac-wakeful ), which will also make sure that your database-checking service stays awake as long as it does its job. It’s very well documented and has several examples available.

    Some theory worth reading can be found at: http://www.vogella.com/articles/AndroidServices/article.html . It is mostly about services, but has some explanations about alarms too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I'm building a Spring MVC web application that runs on Tomcat 6.0.20 and
Hello I'm building an application with Yii that will now generate reports. My client
Hello I am building an application that is going to execute a block of
Hello I am building a database of factual data about my book collection, i.e.
Helo. I am building an application for kids using Phonegap. On Android I have
Hello! I've been programming for a long time but just started developing for android,
Hello I'm building a web application with spring ibatis and mysql. I'm going to
(source: kominetz.com ) Hello. I'm diving into iOS development and am building my own
I'm building a website that sends and email to a user when he registers.
hello i'm building a wpf app with data grids, the pattern is model view

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.