Hi I am developing an application in Android which playing Alarm. It can reset alarm after reboot phone . But there is a problem that, it is running alarm even if alarm is not set at all. Please help me.
Asked
Active
Viewed 69 times
1 Answers
0
You should check you if your 'if' statement is correct before your instruction is running, or if you don't have register 'ON_BOOT_RECEIVER' broadcast in your manifest.
Anothor solution is to debug your code with System.out.println() to check each variable state, or each step.

Yoann Diquélou
- 22
- 1
- 5
-
I have already registered BOOT_RECEIVED broadcast in Manifest.xml that's why its running Alarm after reboot. But its also running even alarm is not set. – Balvinder Singh Aug 22 '14 at 09:35
-
Just set a condition in your broadcastReceiver to check if alarm is set or not before playing it. – Yoann Diquélou Aug 22 '14 at 09:57
-
can you please explore it, how to do that?? – Balvinder Singh Aug 22 '14 at 12:57