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

  • SEARCH
  • Home
  • 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 6997927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:20:44+00:00 2026-05-27T20:20:44+00:00

I am setting some events through AlarmManager. below is the code. AlarmManager AM =(AlarmManager)getSystemService(Context.ALARM_SERVICE);

  • 0

I am setting some events through AlarmManager. below is the code.

  AlarmManager AM =(AlarmManager)getSystemService(Context.ALARM_SERVICE);
  Intent intent = new Intent();
  intent.setAction(Constants.ALARM_ACTION);
  intent.putExtra(Constants.EXTRA_DATA1, data[0]);
  intent.putExtra(Constants.EXTRA_DATA2, data[1]);
  long selectedTime = Long.parseLong(data[2]);
  PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, intent,0);
  AM.set(AlarmManager.RTC,selectedTime, pi);

I want to save each event into database. and when user want to see history of events from the app i can show all the events, when if user choose one event i can be able to delete/reset it.

  • 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-05-27T20:20:45+00:00Added an answer on May 27, 2026 at 8:20 pm

    I solved this my self saving data which is i am passing to this pending itent, and the request code which is second param of the getBroadcast method, and then getting the same from database when i want to cancel the event triggered by AlarmManager.cancel method.
    By using unique request code for every event , we can reset or cancel events with the request code

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

Sidebar

Related Questions

Some guys where I work are setting up a new database server for SQL
Some context upfront: Imagine a 200+ developers company finally setting up a more or
A random class definition: class ABC: x = 6 Setting some values, first for
I'm setting up some monitoring on a few SQL Servers. Currently our environment uses
I'm setting up some VBA in excel to compare two dates to see if
I'm setting up some simple url rewriting rules using mod_rewrite and a .htacces file,
I was wondering if there was a key combination or some setting to change
How to make controls float freely on asp.net webpages? It was some setting to
I've been having some issues setting up a list of items and moving them
At some point in time I turned on a setting in Visual Studio 2005

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.