Но похоже, что этот метод может быть вызван только из MainActivity.cs.
Вы можете вызывать метод в каждом действии, включенном во фрагмент.
Например
в Activity :
// Here, thisActivity is the current activity
if (ActivityCompat.ShouldShowRequestPermissionRationale(thisActivity,Manifest.Permission.WriteExternalStorage))
{
// Show an explanation to the user *asynchronously* -- don't block
// this thread waiting for the user's response! After the user
// sees the explanation, try again to request the permission.
}
вы можете посмотреть Объясните, почему приложению требуются разрешения
в Фрагмент (поддержка v4):
if (ShouldShowRequestPermissionRationale(Manifest.Permission.WriteExternalStorage))
{
}
вы можете посмотреть здесь
и есть изменения в других пакетах, например, в (поддержка v13)
boolean shouldShowRequestPermissionRationale (Fragment fragment,
String permission)
вы можете посмотреть здесь