我想使用以下代码在移动 iam 的时钟应用程序中获取闹钟
Uri uri = Uri.parse("content://com.android.deskclock/AlarmClock");
Cursor c = mContext.getContentResolver().query(uri, null, null, null,null);
if (c != null) {
String names[] = c.getColumnNames();
for (String temp : names) {
System.out.println(temp);
}
if (c.moveToFirst()) {
do {
int i = 0;
for (int j = 0; j < c.getColumnCount(); j++) {
}
} while (c.moveToNext());
}
}
我得到以下异常
java.lang.SecurityException: Permission Denial: opening provider
com.android.deskclock.AlarmProvider from ProcessRecord{4162b268
12999:com.genie9.gcloudbackup/10059} (pid=12999, uid=10059) that is not exported from uid 10011
有人知道我必须在这里使用什么许可吗?我找了很多,找不到有用的东西,谢谢你的帮助