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
0
votes
0 answers

Android: AlarmManager on firing correct alarms

ALREADY ANSWERED, FOR THOSE WHO HAVE THE SAME PROBLEM PLEASE REFERE TO THE BOTTOM OF THIS POST I have this part on my app which schedules an alarm, all was working well, it scheduled the alarm correctly but there is a erratic behavior wherein…
lemoncodes
  • 2,371
  • 11
  • 40
  • 66
0
votes
2 answers

Android: Auto-Cancel an alarm after a certain period or flag

Since i haven't seen any threads regarding canceling an alarm without using any button, or invoking in onClick. I decided to ask this question as well as i would like to also include the question, (since its somewhat related to each other),…
lemoncodes
  • 2,371
  • 11
  • 40
  • 66
0
votes
3 answers

AlarmManager, Service, onStartCommand called but unable to start

I have the Problem that I created a Service which should be created when the AlarmManager wakes up. And actually it's starting (onStartCommand is called, I see the toast), but same time in the log appears: 09-19 02:48:32.537:…
seb
  • 4,279
  • 2
  • 25
  • 36
0
votes
1 answer

I'm confused about service in Android

I have a big program that has many forms and works with database, etc. I have an alarm as a part of my program. When I fire the alarm and clean the memory (in task manager) after 10-20 seconds the alarm fires an event (even if time has not yet…
Gold
  • 60,526
  • 100
  • 215
  • 315
0
votes
2 answers

Android: Stopping Alarm at specific time and service clarification

is there any way to stop an alarm at a given time, for example, i started an alarm on 7:45am and it repeats every 5 minutes and then, i wanted to stop that alarm when the time is already 8:00am? How do i go about this algorithm since alarm…
lemoncodes
  • 2,371
  • 11
  • 40
  • 66
0
votes
2 answers

Alarm not triggering according to time properly after rebooting

I am using AlramManager to setAlarm using Following method: public static void scheduleAlarmReceiverOnce(Context context,String did,long time) { AlarmManager alarmMgr = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); …
sheetal
  • 3,014
  • 2
  • 31
  • 45
0
votes
1 answer

Using wakelock Android

I am checking the location data once every 5 mins. I have this implemented in a service which gets called every five mins. On the main activity I have two buttons to start/ stop the alarm. Is this the best place to implement the lock.. …
user340
  • 375
  • 12
  • 28
0
votes
1 answer

Creating alarm with AlarmManager for a specific period of time

Is there any way to use AlarmManager to activate an alarm for a specific period of time? I have start-time and end-time values stored in the database. I want to start an alarm at start-time that will make the device silent and alarm should end at…
Khobaib
  • 1,577
  • 3
  • 21
  • 29
0
votes
1 answer

Set Alarm To Alert 5 Minutes Before a certian Time

I'm trying to get Alarm Manager to alert the user 5 minutes before an event happens. How do I go about doing this? For example, the time of the event is 10:00:00 and I need set the alarm 5 minutes earlier at 9:55:00. I wasn't able to find examples…
Leoa
  • 1,167
  • 2
  • 14
  • 31
0
votes
1 answer

Android alarm Clock

Hello i have the problem. LogCat giving me some errors. LogCat: 08-05 11:42:30.222: E/AndroidRuntime(623): FATAL EXCEPTION: main 08-05 11:42:30.222: E/AndroidRuntime(623): java.lang.NullPointerException 08-05 11:42:30.222: E/AndroidRuntime(623): at…
Silesia
  • 67
  • 1
  • 9
0
votes
2 answers

Android - Alarm Clock error

I download alarm app because I need see how it works. GNU License. But I can't run it. When I clicked on (something?), I get this error: 08-03 14:40:26.154: E/AndroidRuntime(255): at…
0
votes
2 answers

Implementing unique alarms without creating my own alarm clock application

I have asked this question before (here), however it received no attention and I feel like this could really prove as useful to those who chose to embark on a similar issue. Basically, I am implementing an application that sets alarms for the user,…
Squagem
  • 724
  • 4
  • 17
0
votes
1 answer

Setting multiple Intents for AlarmManager

I use AlarmManager to schedule multiple taks, i.e. Task 1 at 10:56, Task 2 at 11:24 and so on. Here's the code: intent = new Intent(ACTION_RECORDER_START); intent.putExtra(EXTRA_COMMAND_ID, command.id); pendingIntent =…
user468311
0
votes
1 answer

Scheduling multiple alarms

I'm trying to trigger 3 alarms at different times using alarm manager. Here's my code (Note that alarm1, alarm2, alarm3 are three calender objects set earlier in my code): AlarmNum=1; new Runnable() { @Override public void run() { …
Adnan Zahid
  • 573
  • 1
  • 10
  • 38
0
votes
2 answers

How the actual Alarm app is working?

I am looking to know how the actual alarm app popup the dialog box on exact time without any activity in background of it. If you could please see my this post for the exact solution i am looking for but answer to this question is much…
vinothp
  • 9,939
  • 19
  • 61
  • 103