I have a fragment in which I have recyclerview and setting data in this recyclerview using recyclerview adapter.
Now, I am having a button in the adapter\'s list ite
you can call the Fragment method below
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case REQUEST_CODE:
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0 &&
grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// Permission is granted. Continue the action or workflow
// in your app.
doActionBecauseNowYouCanBro();
} else {
// Explain to the user that the feature is unavailable because
// the features requires a permission that the user has denied.
// At the same time, respect the user's decision. Don't link to
// system settings in an effort to convince the user to change
// their decision.
showWhyRequestPermissionsAndDontBlockUserItsCalledManners();
}
return;
}
// Other 'case' lines to check for other
// permissions this app might request.
}