2

My app have next settings

  • minSdkVersion 8
  • targetSdkVersion 23
  • compileSdkVersion 23

And I use simple code to get READ_PHONE_STATE permissions

...
    final List<String> permissions = Arrays.asList(
            Manifest.permission.READ_PHONE_STATE);

    if (!permissions.isEmpty()) {
        ActivityCompat.requestPermissions(activity,
                permissions.toArray(new String[]{}), 1);

    }
...

When I use:

Everything works fine.

But when I use:

App just didn't show dialogs.

Anyone have explanation why this happens?

I trying to minimize all dependencies and use Context and Activity instead ContextCompat and ActivityCompat

Update

Tested on Nexus 9, Android 7.1.1

CAMOBAP
  • 5,523
  • 8
  • 58
  • 93

0 Answers0