Using the Content Manager Alarm Manager.

When I use Alarma Manager. indicating permission error. kindly tell me what permission we should use in the manifest file.

im using this code ...

            Uri uri = Uri.parse("content://com.android.deskclock/alarm");
        Cursor c = 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++) 
                      {
                          c.getString(j));
                   }
                 } while (c.moveToNext());
                }
+3
source share
1 answer

Check LogCat output for error. You will see there exactly the missing permission. If you cannot figure it out, paste the result here.

0
source

All Articles