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 7540145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:34:03+00:00 2026-05-30T07:34:03+00:00

I am developing an application where there are 3 buttons.Say,button_1 for 5 min ,

  • 0

I am developing an application where there are 3 buttons.Say,button_1 for 5 min, button_2 for 10 min , button_3 for 15 min.

when user clicks on one of the button,i set alarm for that time.I am using OneShotAlarm.class as BroadcastReceiver for alarm.I put alarm_time(5,10 or 15 min) in intent to fire alarm like,

Intent alarm_intent = new Intent(context, OneShotAlarm.class);
alarm_intent.putExtra(SNOOZE_TIME, 5);

and I am trying to retrieve this in OneShotAlarm.class,but somehow,it keeps on taking 5 there whatever I put into intent at the time of setting alarm.

Though alarm fires for all options correctly and at correct time,but I don’t get the value properly in OnShotAlarm.classfrom intent’s Integer extra.

I use same alarm request code for all alarms,but creates new objects everytime for setting up alarm.This is,if it concerns.

Hope,I cleared the question enough.Please help me pointing out what I am missing?

EDIT :

I forgot to specify that these three buttons are in a widget and I use a broadvcast receiver to catch their clicks.Sorry for the inconvenience when you tried to put your effort to help me!

  • 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-30T07:34:05+00:00Added an answer on May 30, 2026 at 7:34 am

    I was using these three buttons in widget.I forgot to specify that in my question,I am sorry!

    There was no problem in my code,It was correct.But what I used to call the BroadcastReceiver for catching clicks of buttons of widget,was having a little problem.

    I used these lines in my onUpdate() of WidgetProvider class,

    receiver = new Intent(context, ClickCounterWidgetReceiver.class);
    receiver.setAction("SET_SNOOZE");
    receiver.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);                
    pendingIntent = PendingIntent.getBroadcast(context, 0, receiver, 0);
    

    changing the line to below one solved the issue:

    pendingIntent = PendingIntent.getBroadcast(context, 0, receiver, PendingIntent.FLAG_UPDATE_CURRENT);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing one application in IPad.In that application i want to add 2 buttons
I am developing an application in which there are 7 buttons in every view.
I am developing small application for training purposes. There after click on the button
I'm developing and application that runs as a Windows service. There are other components
We are developing a web application which is available in 3 languages. There are
We are developing a web application that will be sold to many clients. There
I'm developing a Silverlight application where I want to simulate a console. There are
We've been developing an Android application which includes Google Adsense. However there seems to
In a Linux embedded application I'm developing, there is the need to record some
I am developing a Java based desktop application. There are some data generated from

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.