I am trying to follow the guide from google to implements permissions in my app to work with Android M. ( http://developer.android.com/training/permissions/requesting.html )
However, I am NOT able to check the <uses-permission>, my questions is: should I migrate the <uses-permission> into <permission> ?
int permissionCheck = ContextCompat.checkSelfPermission(thisActivity,
Manifest.permission.WRITE_CALENDAR);
My manifest permissions are this:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
To be more explicit I am able to call only this method:
int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.MEDIA_CONTENT_CONTROL);
I can't check the internet, wake_lock or other <uses-permission>