I\'m working on a simple app that browses through the user\'s contacts. Unfortunately I keep getting the following error:
java.lang.SecurityException: Permission
None of the above helped. The solution is quite simple. you'll need a runtime permission request.
with or without placing the permission in your manifest, You will need to request that permission from the User on-the-fly.
if( getApplicationContext().checkSelfPermission( Manifest.permission.READ_CONTACTS ) != PackageManager.PERMISSION_GRANTED )
ActivityCompat.requestPermissions(activity, new String[]{Manifest.permission.READ_CONTACTS}, resultValue);
only then after the approval you will be able to query the contacts phone number/name etc.