Invoking ActivityCompat.requestPermissions does not display the user interface dialog box.
ActivityCompat.requestPermissions(MainActivity.this, new String[]{"Manifest.permission.READ_SMS"}, REQUEST_CODE_ASK_PERMISSIONS);
However, if I change minSDKversion to 23 and run
requestPermissions(new String[]{"android.permission.READ_SMS"}, REQUEST_CODE_ASK_PERMISSIONS);
a dialog box appears. What for? BTW. to run on the emulator requires the emulator to focus on API 23.
android android-6.0-marshmallow
Zvi
source share