Permissions.ShouldShowRationale doesn't exist

Don Glover 511 Reputation points
2020-11-24T16:16:51.217+00:00

In the document Xamarin.Essentials: Permissions https://learn.microsoft.com/en-us/xamarin/essentials/permissions?context=xamarin%2Fandroid&tabs=android

The following line is included in a code snippet

if (Permissions.ShouldShowRationale<Permissions.LocationWhenInUse>())  

ShouldShowRationale does not exist in the essentials package. Is there some other way to get it or is this aspirational code rather than real code?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
0 comments No comments
{count} votes

2 additional answers

Sort by: Most helpful
  1. Don Glover 511 Reputation points
    2020-11-24T16:30:56.997+00:00

    @James Montemagno Thoughts on this?

    0 comments No comments

  2. Don Glover 511 Reputation points
    2020-11-24T16:49:46.883+00:00

    @James Montemagno Thanks. The minimum version should be noted in the document. Also, it compiles now and runs now, BUT I am trying to prompt for camera permissions and the following does not issue a prompt.
    status = await Permissions.RequestAsync<Permissions.Camera>();