1

i'm trying to access alarm provider to get all enabled alarm information.

so i wrote this :

public static final Uri CONTENT_URI =
            Uri.parse("content://com.android.deskclock/alarm");
ContentResolver cr = getContentResolver();
Cursor c = null;

c = cr.query(
                CONTENT_URI, ALARM_QUERY_COLUMNS,
                null, null, DEFAULT_SORT_ORDER);

but it seemed to have the permission problem??

it always crashed QQ......could someone help me?

peterlawn
  • 2,371
  • 6
  • 25
  • 44
  • 2
    This is not part of the Android SDK. It may not work on all devices. It may not work on all current Android versions. It may not work on future Android versions. It is not documented. It is not supported. – CommonsWare May 31 '11 at 10:23

1 Answers1

1

As @CommonsWare points out this only works on certain devices. Although with the other alarm URIs it was possible to read on most platforms. However in Honeycomb they have changed the access required and you can no longer use a content provider to get to the alarms.

Nic Strong
  • 6,532
  • 4
  • 35
  • 50