title: ActivityCompat.requestPermissions not showing dialog box
body: <pre><code>if (ContextCompat.checkSelfPermission(RegisterActivity.this,      Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_DENIED){
              ActivityCompat.requestPermissions(this,
                      new String[]{Manifest.permission.READ_PHONE_STATE}, REQUEST_READ_PHONE_STATE_PERMISSION);
  </code></pre>
  
  <p>i'm trying to use this function on nexus 5 api 23 and its just not showing me the dialog box like its supposed to do, it's just not doing anything.
  what could cause the problem? (this code is in the java activity)
  i tried changing my minimum api to 23 and use the requestPermissions() without the ActivityCompat but still not working.</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 23
  buildToolsVersion "23.0.2"
  
  defaultConfig {
      applicationId "com.example.idanayzen.photomap"
      minSdkVersion 23
      targetSdkVersion 23
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.1.1'
  compile 'com.google.android.gms:play-services:8.4.0'
  compile 'com.android.support:design:23.1.1'
  }
  </code></pre>
  
  <p>and the Manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.idanayzen.photomap"&gt;
  
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.READ_SMS" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
  
  
      &lt;meta-data
          android:name="com.google.android.geo.API_KEY"
          android:value="@string/google_maps_key" /&gt;
  
      &lt;activity
          android:name=".MapsActivity"
          android:label="@string/title_activity_maps" /&gt;
      &lt;activity android:name=".RegisterActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".WrongPhoneNum"&gt;&lt;/activity&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>