Skip to content Skip to sidebar Skip to footer

Android Alarmclock Causing Force Close

I'm writing an app that sets an alarm, and here's the relevant code that's causing a force close: Intent i = new Intent(AlarmClock.ACTION_SET_ALARM); i.putExtra(AlarmClock.EXTRA_HO

Solution 1:

If your API is 9+,

Then use this permission in your manifest file,

<uses-permissionandroid:name="com.android.alarm.permission.SET_ALARM"></uses-permission>

EDIT:

Look at this page Android - AlarmClock

Solution 2:

This API works only for version 9+. What Android version you are using?

You can also call queryIntentActivities() (via the PackageManager) in order to check if anything will respond to your call before you actually call the startActivity() method.

Hope this helps!

Post a Comment for "Android Alarmclock Causing Force Close"