neither user 10632 nor current process has android.permission.READ_PHONE_STATE error in Android 6
You also need to request permission at run time.
int permissionCheck = ContextCompat.checkSelfPermission(thisActivity,
Manifest.permission.READ_PHONE_STATE);
If the app has the permission, the method returns PackageManager.PERMISSION_GRANTED, and the app can proceed with the operation. If the app does not have the permission, the method returns PERMISSION_DENIED, and the app has to explicitly ask the user for permission.
If you dont get it , you should request it
ActivityCompat.requestPermissions(thisActivity,
new String[]{Manifest.permission.READ_PHONE_STATE},
MY_PERMISSIONS_REQUEST_READ_PHONE_STATE);
Neither user 10085 nor current process has android.permission.READ_PHONE_STATE
Solved using this::
deviceId = Settings.Secure.getString(context.getContentResolver(),
InstanceID.getInstance(context).getId());
Related Topics
Toolbar and Contextual Actionbar with Appcompat-V7
Best Practice for Nested Fragments in Android 4.0, 4.1 (<4.2) Without Using the Support Library
Simulate Low Network Connectivity for Android
Ripple Effect on Android Lollipop Cardview
How to Get the Current Page Number of a Viewpager for Android
Converting Yuv->Rgb(Image Processing)->Yuv During Onpreviewframe in Android
How to Use Adb in Android Studio to View an SQLite Db
How to Set Custom Actionbar Color/Style
Changing Overflow Icon in the Action Bar
Passing Argument to Dialogfragment
Sqlite Android Database Cursor Window Allocation of 2048 Kb Failed
Download Files and Store Them Locally with Phonegap/Jquery Mobile Android and iOS Apps
Display Badge on Top of Bottom Navigation Bar's Icon
Android Notification Is Not Showing
Android.Content.Context.Getpackagename()' on a Null Object Reference
How to Use Setarguments() and Getarguments() Methods in Fragments