title: React Native PermissionsAndroid - Tried to use permissions API but the host Activity doesn't implement PermissionAwareActivity
body: <p>I am trying to request bluetooth permissions on Android M (API 23) during runtime using <a href="http://facebook.github.io/react-native/releases/0.43/docs/permissionsandroid.html#permissionsandroid" rel="nofollow noreferrer">PermissionsAndroid</a> from <code>react-native</code>.</p>
  
  <p>I get the following error <code>Tried to use permissions API but the host Activity doesn't implement PermissionAwareActivity</code>. Any ideas as to how I can fix this error?</p>
  
  <p>My code is</p>
  
  <p><strong>Bluetooth.js:</strong></p>
  
  <pre><code>componentWillMount() {
      ...
      this.checkAndGrantPermissions();
  }
  async checkAndGrantPermissions() {
      const granted = await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.LOCATION,
        {
          title: 'Cool Photo App Camera Permission',
          message: 'Cool Photo App needs access to your camera ' +
                     'so you can take awesome pictures.'
        });
  }
  </code></pre>
  
  <p>I also tried doing this: </p>
  
  <pre><code>async checkAndGrantPermissions() {
      await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.LOCATION,
          {
          title: 'Cool Photo App Camera Permission',
          message: 'Cool Photo App needs access to your camera ' +
          'so you can take awesome pictures.'
          }
      ).then(() =&gt; {
  
      }).catch((err) =&gt; {
          console.log(err);
      });
  }
  </code></pre>
  
  <p>But then I get this error: </p>
  
  <p><code>{"framesToPop":1,"code":"E_INVALID_ACTIVITY","line":8001,"column":29,"sourceURL":"http://packager.xb-kvy.darkwata.pentaheliosapp.exp.direct:80/main.bundle?platform=android&amp;dev=true&amp;hot=false&amp;minify=false"}</code></p>