ReactNative : permission always return 'never ask again'

Viewed 3274

am using following code base to request the permission but it always return 'never ask again'

 async requestPermission(request){
        try{
           const response= await PermissionsAndroid.request('PermissionsAndroid.PERMISSIONS.CAMERA',{
            'title': 'Cool Photo App Camera Permission',
            'message': 'Cool Photo App needs access to your camera ' +
                       'so you can take awesome pictures.'
          })
           console.log(response)
        }catch(err){

        }
        this.getcurrentLocation()
    }

//Response never_ask_again

3 Answers

I recently faced this issue about LOCATION service permission. I forgot to add android.permission.ACCESS_FINE_LOCATION in AndroidManifest.xml.

So, I think you also forgot to add
<uses-permission android:name="android.permission.CAMERA" />
in your AndroidManifest.xml

I did clean and rebuild several times and finally started working, somehow the build cache is not properly updating.

Related