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

How to wake up my App Periodically

I want to make an functionality, like reminder, in Android. I want to start-up my app/activity, when it is not running, or its UI is invisible. It is some-thing like same as reminder, that wakes ups the app at desired time. I have not worked with…
Chintan Raghwani
  • 3,370
  • 4
  • 22
  • 33
4
votes
1 answer

Timestamp at which phone turned off?

For Android devices, is there any way to find out at what time ( or timestamp ) the device turned off?
Jitendar M
  • 633
  • 1
  • 10
  • 26
4
votes
1 answer

Keep track of multiple alarms with Android

I need to set a number of alarms that repeat weekly, to automatically put the phone on vibrate when the user is on some class (it's an academic app) and then reset the volume when the class finishes. I already have the alarms being created, but I…
Rodrigo Castro
  • 1,573
  • 14
  • 38
3
votes
1 answer

Android Alarm never received

I tried to get my application run at a specified time but I can't get it working. I can see my pending alarms while running adb shell dumpsys alarm and the alarm stat that increasing every time I run the AlarmActivity. I added adb shell dumpsys…
Fabien
  • 33
  • 4
3
votes
3 answers

How to launch Alarm Clock screen using Intent in Android?

In my application, i want to add alarm using my App. So i want to launch the add alarm screen of the phone directly from my App. So how to launch it using Intent?
Arindam Mukherjee
  • 2,255
  • 11
  • 48
  • 83
3
votes
1 answer

AlarmManager occasionally doesn't fire alarm

I'm developing a live wallpaper for Android. To refresh the wallpaper at set times I use AlarmManager. Most of the times this works great, but occasionally my alarm isn't received. On top of that I can't replicate this behaviour, it just randomly…
Thomas
  • 1,508
  • 2
  • 22
  • 35
3
votes
1 answer

How to get around setting a unique ID for AlarmManager?

I am using this code to launch an Alarm. The alarm is set in an Activity that the user can launch. //Setting alarm to fire off NEW_GAME intent every 24 hours. String alarm = Context.ALARM_SERVICE; Calendar calendar =…
yoshi24
  • 3,147
  • 8
  • 45
  • 62
3
votes
1 answer

Can we startForegroundServie from an exact alarm's receiver in the background?

In one of the exemptions of the "cannot start foreground service from background" restriction, the doc mentions: Your app invokes an exact alarm to complete an action that the user requests. Does this mean that the usage scenario below can…
3
votes
1 answer

Flutter repeat alarm on user selected week days

If my user sets some data like: day : "Sunday" startTime: 8:00 A.M endTime: 8:00 P.M frequency: 30 minutes I want to fire an alarm after each 30 minutes starting from 8:00 A.M so, 8:00 A.M, 8:30 A.M, 9:00 A.M, 9:30 A.M .... Now I'm using…
user14709104
3
votes
1 answer

AlarmManager set as PM firing at AM time

The problem I'm using Android's AlarmManager to fire a notification on my app periodically based on a time set by the user on a settings screen. I've followed the documentation to implement that. It's done like the snippet below: fun…
Mauker
  • 11,237
  • 7
  • 58
  • 76
3
votes
3 answers

Android Notification: How to show sticky/updating alarm

I have an app where I'd like to show a notification at the top of the screen, with the time updating, and have it stay there until the user dismisses it or presses an action. My question is, how do I have the notification stay at the top of the…
Jacob Stinson
  • 181
  • 1
  • 16
3
votes
1 answer

How to start an Activity off a BroadcastReceiver

I am currently working on a alarm application for android (yea i know im not the only one). I'm fairly new to Android Developing but I've managed to complete the core of the App and all i need is 1 thing. To be able to set an alarm (at x-y-z time)…
3
votes
2 answers

Android: connectivity issues in background thread after alarm when "always-on" turned off

Problem description: In my android App, I experience connectitity issues when doing a remote HTTP ("polling") call from an AsyncTask that was started after an alarm went off. The lookup works very well when the standard Android setting "Enable…
Jörg
  • 2,441
  • 1
  • 20
  • 18
3
votes
1 answer

Background activity blocked while using AlarmManager. (Android Q privacy change)

In my project I am using AlarmManager in order to trigger daily AlarmClock but when the time comes to start an alarm following toast message occurs: Background activity start from com.example.nameOfApp blocked. See g.co/dev/bgblock Updated…
Paweł Bęza
  • 1,375
  • 1
  • 13
  • 23
3
votes
1 answer

How to repeat an action every day in an Android app?

I want to repeat an action every day; it must continue working even if the app is not running or the device has been restarted (rebooted). In my code I'm trying to show a TOAST message every 1 minute (as a test); it's working fine in the emulator…
WIKOSO
  • 105
  • 1
  • 2
  • 12