Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reboot looses alarm setting #27

Closed
GoogleCodeExporter opened this issue Nov 1, 2015 · 6 comments
Closed

Reboot looses alarm setting #27

GoogleCodeExporter opened this issue Nov 1, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Reboot the device when alarm is set. This could happen when the System 
crashes over night.

What is the expected output? What do you see instead?
The alarm should be set even after reboot, but it is not. You will come late to 
work -> :-((((

Please provide any additional information below.
Solution, from Android SDK:
Registered alarms are retained while the device is asleep (and can optionally 
wake the device up if they go off during that time), but will be cleared if it 
is turned off and rebooted. 

So you have to auto start the application after reboot and re-set the alarm via 
alarmmanager class.
Please fix this issue even if it is the last you do with this app - it simply 
would make it perfect.

Original issue reported on code.google.com by stefan.j...@gmail.com on 24 Aug 2010 at 8:22

@GoogleCodeExporter
Copy link
Author

Well I see that you implemented auto start after boot completed already? Sadly 
it did not work for me today... :-/

Original comment by stefan.j...@gmail.com on 24 Aug 2010 at 8:26

@GoogleCodeExporter
Copy link
Author

Yes, the alarms should automatically reschedule themselves when the phone 
reboots.  Do you see this problem with the built-in alarm as well?  What kind 
of phone and which version of the android OS are you using?  If the problem 
exists in the stock alarm as well, your operating system is probably not 
sending the ACTION_REBOOT broadcast when it restarts.

If you put alarm klock into debug mode (by selecting application settings -> 
debug mode) you should see a popup during reboot that says 'rescheduling alarm 
1' etc for each alarm that is to be rescheduled after a boot.  If this dialog 
does not pop up, it means the application did not receive the ACTION_REBOOT 
broadcast.

Original comment by kraigs.a...@gmail.com on 24 Aug 2010 at 1:33

@GoogleCodeExporter
Copy link
Author

I think I found the reason why it did not work: It was because the app has been 
installed on the SD card. I have patched the default installation target to SD 
card so all apps that do not specify explicitly that they should be installed 
in the phone memory get installed on the SD card.
So it was my fault.

But, you may set the install location to phone memory for froyo just to make 
sure this does not happen again. - > 
http://developer.android.com/guide/appendix/install-location.html
Thank you for your fast response.

SJ
(HTC Desire , Froyo 2.2)

Original comment by stefan.j...@gmail.com on 24 Aug 2010 at 7:07

@GoogleCodeExporter
Copy link
Author

Already have an outstanding bug to do so:
http://code.google.com/p/kraigsandroid/issues/detail?id=22

It will be a bit tricky in order to maintain backward compatibility, though, 
haven't gotten around to messing with it yet... (the app currently works back 
to 1.6).

Original comment by kraigs.a...@gmail.com on 24 Aug 2010 at 7:17

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

You should NOT allow to install on SD card I think. On boot completed you will 
not get a call of the broadcast receiver when the app is on the SD card.  Your 
app is an Alarm Service: 
http://developer.android.com/guide/appendix/install-location.html#ShouldNot

Concerning backward compatibility:
At least it says "When your application is installed on a device with an API 
Level lower than 8, the android:installLocation attribute is ignored and the 
application is installed on the internal storage."

Original comment by stefan.j...@gmail.com on 24 Aug 2010 at 7:53

@GoogleCodeExporter
Copy link
Author

Oh, interesting.  Thanks for the pointer.  That certainly makes resolving that 
issue easier :-)

Original comment by kraigs.a...@gmail.com on 24 Aug 2010 at 8:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant