Cannot Resolve Provider For Content://com.android.alarmclock/alarm
Solution 1:
Note that the Permissions of a alarms.db file in /data/data/com.android.alarmclock/databases/alarms.db (API 7-8) or /data/data/com.android.deskclock/databases/alarms.db (API 9-15) is -rw-rw----.
By this thing we cannot access the db file, even with an idea of URIMatcher class.
Till API 8, we have no specialized class available for Alarms, but from API 9, we can set an Intent with loaded Extras to set an Alarm at approximate Time.
I am also searching for ways to get down to solve this problem, hope someone finds the complete solution to this mess.
Solution 2:
Correct URI starting from API 9 is "content://com.android.deskclock/alarm". I'm still resolving the permission problem however.
Solution 3:
You can set the alarm by following code as developers provide a new class to set Alarm.Use this code
Intenti=newIntent(AlarmClock.ACTION_SET_ALARM);
i.putExtra(AlarmClock.EXTRA_HOUR, 11);
i.putExtra(AlarmClock.EXTRA_MINUTES, 37);
i.putExtra(AlarmClock.EXTRA_MESSAGE, "birthday");
startActivity(i);
its working properl.But still i didnt get how to disable a set alarm.Please help.
Post a Comment for "Cannot Resolve Provider For Content://com.android.alarmclock/alarm"