0

I am working on alarm clock and I want to check whether phone is switched on or off when alarm ringing on set time.

If phone is switched off then switch it on and ring the alarm.

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
Bhavinkumar Patel
  • 515
  • 1
  • 12
  • 28

1 Answers1

1

Try this it may help you

http://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN `

<receiver android:name=".ShutdownReceiver">
    <intent-filter>
        <action android:name="android.intent.action.ACTION_SHUTDOWN" />
        <action android:name="android.intent.action.QUICKBOOT_POWEROFF" />
    </intent-filter>
</receiver>`
Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
Yogesh Borhade
  • 694
  • 1
  • 10
  • 24