The given example produces an Exception (android.content.ActivityNotFoundException: No Activity found to handle Intent)
Intent i = new Intent(AlarmClock.ACTI
You need to set permission in manifest file also.
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
Do you have any ideas, what can be going wrong?
The device does not support that activity. This is not unheard of. Either catch the exception and let the user know, or use PackageManager
and queryIntentActivities()
to see if anything will respond to your Intent
in advance of calling startActivity()
.