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

1165 questions
9
votes
2 answers

Cancelling a single alarm when you have multiple alarms

I have used the same pendingIntent to set multiple alarms using different intentId for each. the alarm is working. Now i want to cancel a particular alarm. If i use the cancel() method i would end up cancelling all the alarms. I want only a specific…
flamesavor
  • 129
  • 3
  • 8
9
votes
1 answer

android prevent immediate trigger of alarm service if alarm time has passed for the day

The reference for Alarm Manager says that If the stated trigger time is in the past, the alarm will be triggered immediately. I am facing this problem in my application. Here is my alarm manager code : Intent myIntent = new…
Flame of udun
  • 1,888
  • 6
  • 28
  • 67
9
votes
3 answers

How to start a dialog (like alarm dimiss /snooze) that can be clicked without unlocking the screen

I dont want to permanently bypass keyguard, just for that moment .For example when a alarm is raised (eg wake up alarm) i can dismiss /snooze it whithout unlocking screen .I want to achive the same behaviour.I want start a dialog which should be on…
user93796
  • 17,329
  • 29
  • 84
  • 133
9
votes
2 answers

Bind Service to BroadcastReceiver

I have some Service class, which registers multiple alarms. In my BroadcastReceiver class, I want the onReceive() method to call some method of the Service class. However, I don't see how I can bind them together. I tried to make the…
Mugen
  • 5,490
  • 3
  • 47
  • 97
8
votes
4 answers

How to poll a webservice at finite interval from android?

i am developing an android app to show notifications.How can i poll a webservice at finite interval (say 10 min interval) to check for any update and show as notification in android notification panel.
8
votes
2 answers

Android P Beta - AlarmManager Notifications not working

I'm testing my application on Android P beta release 4. My app's targetSdkVersion is 27 It has been observed that alarm manager notifications are not working as expected. I'm using below code to set the notifications - if…
8
votes
2 answers

AlarmManager not working properly

I'm trying to create an alarm based application. I'm using AlarmManager. The thing is that it's not reliable at all. In some devices it works.. in other devices it works somethimes.. and in other devices it doesn't work at all. When I say that it…
JFValdes
  • 407
  • 7
  • 16
8
votes
3 answers

Repeat alarm everyday accurately (Alarm manager)

I set an alarm to repeat everyday. but it will have a few seconds or minutes error. How can I make it more accurate? PendingIntent pendingIntent = PendingIntent.getBroadcast(getActivity(), notificationId, myIntent,…
Hung Wei Chun
  • 125
  • 1
  • 1
  • 8
8
votes
1 answer

Show Dialog using PendingIntent

I am working on Calender Events reminder . There is no native Calender events reminder in Android so user install different calender apps. Now these apps can be different on reminding events like on reminder notifications can be shown. Now I want…
User42590
  • 2,427
  • 10
  • 39
  • 84
7
votes
2 answers

How to update an app widget on midnight?

My app has a widget that shows today's date and need to be updated on midnight. The widget is defined in the manifest as ... ...
7
votes
3 answers

Android full screen notification won't show over the lock screen

I'm trying to create an android full screen notification to show an activity over the lock screen, like an alarm clock. The notification always occurs, but the activity is never started over the lock screen; it just rings and shows a notification…
7
votes
1 answer

How to implement robust alarm clock applications for Android 26+

I maintain an Alarm Clock application as a hobby which I have recently started to migrate to the target API level 26. Because of the background service limitation my app does not work reliably anymore. Current implementation works like this: User…
7
votes
1 answer

Updating a widget only when device is on AND widget is visible on home screen

As far as I understood the official documentation about Widgets I am a little bit confused. The "standard" way would be to define a BroadcastReceiver and define the update frequency in milliseconds - this way allows a minimum update interval of 30…
Zordid
  • 10,239
  • 11
  • 38
  • 57
7
votes
2 answers

updating alarm from pending intent in android

I am working on an Alarm Clock project and i want to edit my already set Alarm. when I edit alarm then alarm time is updated but values that I send by using putExtra() are not changing. I am using PendingIntent.FLAG_ONE_SHOT flag. But when I set…
Sunit Kumar Gupta
  • 1,185
  • 1
  • 10
  • 19
7
votes
1 answer

Location Alarm for Android?

When starting my app, several POI coordinates shall be added to the Android System. Some hours later, my app is closed and the user walks close to one of the POI he shall get notified e.g. through a status message. Is this the right approach for my…
1 2
3
77 78