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
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,473
  • 12
  • 44
  • 85
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
2 answers

Android permission SCHEDULE_EXACT_ALARM required with USE_EXACT_ALARM for alarm app?

My app, already published on Google Play and currently targetting Android 12, is an alarm clock app. In the latest release, I have used the SCHEDULE_EXACT_ALARM permission and also handled checking and requesting this permission at runtime, as…
Wrichik Basu
  • 1,005
  • 17
  • 28
7
votes
2 answers

Flutter app, check daily at x time to see if I need to send local notification to user

I am a little uncertain as to how I could go about doing this task and was hoping for some clarification. The APP: It reminds people to water their plants and the user can specify how often they wish to do so. The problem I am facing is how I can go…
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,451
  • 11
  • 42
  • 58
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,203
  • 1
  • 11
  • 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…
7
votes
1 answer

Android how to cancel AlarmManager.setAlarmClock()

There is this new AlarmManager.setAlarmClock(...) method in API 21, which sets a new alarm and displays a status bar alarm icon. I use it like this: AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); Intent intent =…
7
votes
1 answer

Android Ringtone picker list with default option selected

I am trying to display a window picker dialog in android with the default selection to be instead of "None" how it is currently, to be selected the default phone's alarm/ringtone. Here is the code I tried: Intent intent = new…
Adrian Olar
  • 2,883
  • 4
  • 35
  • 63
7
votes
1 answer

Android: Get default or currently set alarm sound/tone?

I searched with many terms and sentencing but could not find any information on this whatsoever. So anyways: How can I get default or currently set music/tone/sound for Alarm (Default app) ? Say if I wake up every morning with alarm song playing:…
arleitiss
  • 1,304
  • 1
  • 14
  • 38
7
votes
2 answers

What happens to the alarms set via alarm manager by an app, if the app is uninstalled

I have the below code to set up an alarm from my app. Intent intent = new Intent("MY_ALARM_NOTIFICATION"); intent.setClass(myActivity.this, OnAlarmReceive.class); intent.putExtra("id", id); PendingIntent pendingIntent =…
tony9099
  • 4,567
  • 9
  • 44
  • 73
7
votes
3 answers

AlarmManager firing alarm past the time it was set on the same day, setRepeating

So basically I have this code, time returns 24hour time and repeats the alarm daily. public setAlarm(String time, Context context){ String[] strTime; strTime = time.split(":"); int hour, min, sec; //set when to alarm hour =…
useletters
  • 325
  • 3
  • 15
7
votes
3 answers

how to repeat alarm week day on in android

I want to get alarm on monday to friday only. my code is here if (chk_weekday.isChecked()) { int day = calNow.get(Calendar.DAY_OF_WEEK); if (day == 2 || day == 3 || day == 4 || day == 5 …
ckpatel
  • 1,926
  • 4
  • 18
  • 34
7
votes
3 answers

AlarmManager when the phone is turned off - ANDROID

I'm doing an alarm System but i've a problem when the phone is turned off.. The alarm doesn't work.. I'm setting de alarm as follows: public void doIntents(Context context, long milis, Tratam trat){ cal=Calendar.getInstance(); …
7
votes
1 answer

Repeat Alarms on Every Monday in Android using AlarmManager/BroadcastReceiver

I want to repeat my task on every Monday at 09:00AM & 05:00 PM. I used following code for that but I am not able to repeat the task. Activity Code: public class AndroidScheduledActivity extends Activity { /** Called when the activity is first…