Questions tagged [android-alarms]

Android alarms is the facility provided by Android through AlarmManager to start an intent at a given time (by passing a pending intent).

Android alarms is the facility provided by Android through AlarmManager to start an intent at a given time (by passing a PendingIntent) which can be used to start an activity or a service or send a broadcast.

AlarmManager Class Reference

1179 questions
2
votes
0 answers

Alarm Manager + Notification actions

I am trying to create a notification with two actions - Dismiss and Snooze but the first action is never called. I am trying the notification the following way: NotificationCompat.Builder builder = (NotificationCompat.Builder) new…
user3637775
  • 499
  • 4
  • 20
2
votes
1 answer

android - What do I need to keep to persist alarm after reboot?

I am currently developing an android application where I need to setup persistent alarms that will fire on a specific date and time and show a notification. It works well but the system clears all alarms upon rebooting. From other questions I know…
2
votes
1 answer

Scheduled alarm never calls receiver class

I'm trying to set an alarm to fire every 5 minutes. This is the code for setting the alarm : @Override public void scheduleAlarmManager() { Timber.i("After SignIn sets AlarmManager"); // broadcast Intent intent = new Intent(this,…
Mes
  • 1,671
  • 3
  • 20
  • 36
2
votes
2 answers

How to show popup dialog over lock screen like Android Alarm Clock when getting GCM

I need to show message on top of the lock screen, like Android Alarm Clock is displaying full screen of the alarm, when it's the time to wake up. Here is a photo of one of the screen popup when there is alarm: Screenshot
Oded BD
  • 2,788
  • 27
  • 30
2
votes
2 answers

How to set an alarm over a specific date range?

I've searching for this requirement from a very longtime and couldn't find anything. So i'm seeking help from you guys. I've a requirement where i need to set an alarm manager over a specfic date range. I mean from 28-Sept-2016 to 30-Sept-2016 at…
coders
  • 719
  • 1
  • 11
  • 35
2
votes
2 answers

How to set alarm based on date and time saved in database android

I am using a custom event to store data in the database, I have subject, description, date, and time. Is it possible to set an alarm based on the date and time inserted in the database? I am trying to retrieve all of dates and time to match up on…
2
votes
1 answer

Android offline reliable date duration

I want to design an offline payment method where the user can use the app for duration of the payment only. I want the payment duration to be reliable even though the user changes their phones time/date. I've tried using AlarmManager to periodically…
fuadj
  • 434
  • 4
  • 10
2
votes
1 answer

Periodically run a service in the background

We are designing an app that users use on a subscription basis. When the user pays for a particular period, a receipt is issued from our server valid for the duration. The app is designed to be used "offline", so it will only be connecting with the…
fuadj
  • 434
  • 4
  • 10
2
votes
1 answer

Call Service With AlarmManager

I have created one service which I want to call periodically through AlarmManager. I have written code for same, But it's not calling. If I call BroadcasrReciever through AlarmManager, then it's working fine. Below is my Code, @Override …
2
votes
1 answer

Alarm Manager setRepeating stops working after a while

I know that there are similar questions around but none helped me... I'm trying to set a repeating alarm to fire a broadcast receiver, which will in turn fire an intentservice. I know about doze mode postponing alarms and I don't mind. At first the…
2
votes
1 answer

What is the difference between setExact, setInexactRepeating and setRepeating? when and which to use?

Hi I am using alarmManager to trigger alarm for every 3 minutes. So I used setRepeating method for alarm to trigger for every 3 minutes. This works in some device. But when it goes in sleep mode and then turned on, alarm is not working. public…
Shadow
  • 6,864
  • 6
  • 44
  • 93
2
votes
0 answers

0 value for flag parameter in getBroadcast()

I'm creating my own reminder app, but now I have a question about the getBroadcast method, and I can't find its answer: To study and have an example of how to make an alarm, on the web I see that all the people make a PendingIntent in this…
2
votes
3 answers

get Permission Denial even when using for SET_ALARM?

I'm very new to Android Studio as well as android programming. I've just read about the first common Intent tutorial, it's about the AlarmClock. I tried writing a simple code to test that Intent but it's not working with a SecurityException thrown,…
Hopeless
  • 4,397
  • 5
  • 37
  • 64
2
votes
1 answer

Alarm ringing stops when cleared from ram

I am making an alarm clock which asks user to do a particular work in order to close the alarm when it rings. It is working fine but the problem is that if the user closes the alarm app from the recent activities while the alarm is ringing, the…
Priyanshu Goyal
  • 332
  • 4
  • 17
2
votes
2 answers

How to set alarm thrice in everyday in android?

I need to set Alarm on 9.00 AM, 11 AM and 1PM in everyday. Simple solution is to use three different pending Intent but Is it any other way to implement same with one pending Intent? Thanks in Advance!
Mukesh
  • 402
  • 4
  • 19