Allow Multiple Run Time Permission
Answer :
First parameter is android.app.Activity
type, You can't pass context
at this place so use this
instead of context
like below code :-
if (ActivityCompat.shouldShowRequestPermissionRationale (this, READ_PHONE_STATE) ||ActivityCompat.shouldShowRequestPermissionRationale (this, WRITE_EXTERNAL_STORAGE)|| ActivityCompat.shouldShowRequestPermissionRationale (this, CAMERA) || ActivityCompat.shouldShowRequestPermissionRationale (this, READ_CONTACTS) || ActivityCompat.shouldShowRequestPermissionRationale (this, CALL_PHONE) || ActivityCompat.shouldShowRequestPermissionRationale (this, ACCESS_FINE_LOCATION) || ActivityCompat.shouldShowRequestPermissionRationale (this, READ_SMS))
Comments
Post a Comment