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
6
votes
2 answers

Set an Alarm from My application

I want to create an alarm object from my application. I am writing a To-Do application which will have an option to set an Alarm on the phone. I wanna set the Date and Time and also the Label for the alarm. Calendar c =…
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
6
votes
0 answers

How to get the deep link URI from AlarmClock providers ACTION_SET_ALARM intent for use with ACTION_DISMISS_ALARM?

I'm implementing a simple alarm system into my Android app using the built-in alarm clock app. I can create an alarm easily using ACTION_SET_ALARM and that works, but I need to be able to dismiss specific alarms should the user remove or change the…
6
votes
2 answers

Android Studio set an exact alarm with Icon

I'am trying to make an Alarmclock App. Currently I'am using AlarmManager. My minSdkVersion is API Level 19. The Problem is, i cant get an exact Alarm like other apps. For Example AlamDroid in the Playstore: It fires the Alarm right in the second…
MindCode
  • 99
  • 1
  • 9
6
votes
0 answers

Setting Alarms on devices with multiple users

My app fails on android 5.1 version devices with the error below. How do we handle this case where the device is possibly configured with multiple users? java.lang.SecurityException: get application info: Neither user 1510130 nor current process has…
6
votes
1 answer

Difference between setAndAllowWhileIdle and setExactAndAllowWhileIdle

What is difference between AlarmManager.setAndAllowWhileIdle() and AlarmManager.setExactAndAllowWhileIdle()? How does these both affect Doze mode introduced in Android 6.0 (Marshmallow) API?
6
votes
1 answer

Android alarm events gets delayed

I have developed my android alarm app which need to something every hour(like 1pm, 2pm, 3pm ,4pm ,5pm ,6pm etc). Now am using alarmManager so that I get a broadCast event every hour.But sometimes the event is delayed. AlarmManager alarmManager =…
user93796
  • 18,749
  • 31
  • 94
  • 150
6
votes
4 answers

How to set Alarm for working days in android

I have a scenario Setting alarm for (Monday to Friday) Let say I choose time that is: hour = 9, minutes = 15, am_pm = "AM". Now I want to set Alarm for every Monday to Friday at 9:15 AM Code below I tried but not getting desired…
Zubair Ahmed
  • 2,857
  • 2
  • 27
  • 47
6
votes
4 answers

AlarmManager.RTC_WAKEUP not working for some devices

I am using AlarmManager in my application to set alarm for a particular time. I have used AlarmManager.RTC_WAKEUP to set the alarm. When I am testing the same it's working on number of device like Lg optimus, Sony Xperia etc. But while testing the…
Salman Khan
  • 2,822
  • 5
  • 32
  • 53
6
votes
1 answer

Creating a Notification at a particular time through Alarm Manager

I am trying to create a notification at a particular time. Im creating a broadcast receiver and calling it through the AlarmManager. Problem is that the broadcast is not received and that I am not getting any notifications. Registering the…
6
votes
1 answer

Repeat alarm everyday at specific time (Alarm manager)

Hi I want my application to run at specific time daily. for this I am using below code. But it runs only for one time. Whats the mistake here how can i achieve this task. AlarmManager alarmMgr0 =…
Rida Shahid
  • 386
  • 7
  • 22
6
votes
2 answers

Repeat Alarm once in a week in android

I am trying to develop alarm functionality in a my app which runs on a week days specified by user on fixed time. Problem here is that my scheduler running for all days instead of running on specified day . here is the code i wrote for this please…
Supreet
  • 2,451
  • 8
  • 25
  • 42
6
votes
1 answer

AlarmManager not working in sleep mode

I have set an AlarmManagr with a repeat time. Here is my method by which I am setting it: public void setAlarmManager(Context context, Intent intent) { PendingIntent pendingIntent; pendingIntent =…
Reyjohn
  • 2,654
  • 9
  • 37
  • 63
5
votes
2 answers

can AlarmManager(alarm.setRepeating) work in case of phone restart - Android

I came in to scenario that I want to trigger service on specific time. What I Know is... I need use AlarmManager, and I found this question in hear, Using Alarmmanager to start a service at specific time. Now, I am able to start service on specific…
Nixit Patel
  • 4,435
  • 5
  • 30
  • 57
5
votes
1 answer

My android alarms are being cancelled, and not by me

My app uses an alarm timer to check for updates on a server every 2 minutes or so. I create a recurring timer using this: alarmIntent = new Intent(context, OnWakeUpReceiver.class); PendingIntent pIntent = PendingIntent.getBroadcast(context,…
Rob
  • 801
  • 2
  • 9
  • 16
5
votes
1 answer

Android: why did the Alarm notification stop after system reboot

I am developing an android application that should fire an alarm five times a day: - the times in each day is not constant - after the alarm is fired I will schedule the next alarm. My problem is : the alarm notification works for 1 day then it…