本文介绍了内容无法解析提供商://com.android.alarmclock/alarm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我提出这个程序只是对我来说,与API 9和股票闹钟。
我发现这个:
和在创建我的主要活动是这样的:
ContentResolver的CR = getContentResolver();
AlarmDatabase广告=新AlarmDatabase(CR);
记录r = ad.getNearestEnabledAlarm();
当我使用URI内容://com.android.alarmclock/alarm它给了我在logcat中:
无法解析的内容提供商://com.android.alarmclock/alarm
未能找到com.android.alarmclock供应商信息
和比我试图与内容://com.android.deskclock/alarm:
权限被拒绝:checkComponentPermission()reqUid = 10009
拒绝的权限:从ProcessRecord开放商com.android.deskclock.AlarmProvider {407cf3b0 15716:com.my.app/10137}(PID = 15716,UID = 10137)需要空或空
解决方案
正确的URI API,从9日起为内容://com.android.deskclock/alarm。我仍然但是解决权限问题。
I am making this app just for me, with api 9 and stock alarm clock.
I found this: http://code.google.com/p/android-alarm-database/
and in on create of my main activity is this:
ContentResolver cr = getContentResolver();
AlarmDatabase ad = new AlarmDatabase(cr);
Record r = ad.getNearestEnabledAlarm();
When i use URI content://com.android.alarmclock/alarm it gives me in logcat:
Cannot resolve provider for content://com.android.alarmclock/alarm
Failed to find provider info for com.android.alarmclock
And than i tried with content://com.android.deskclock/alarm:
Permission denied: checkComponentPermission() reqUid=10009
Permission Denial: opening provider com.android.deskclock.AlarmProvider from ProcessRecord{407cf3b0 15716:com.my.app/10137} (pid=15716, uid=10137) requires null or null
解决方案
Correct URI starting from API 9 is "content://com.android.deskclock/alarm". I'm still resolving the permission problem however.
这篇关于内容无法解析提供商://com.android.alarmclock/alarm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!