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,362 questions
0 comments No comments
{count} votes

Accepted answer
  1. James Montemagno 351 Reputation points Microsoft Employee
    2020-11-24T16:34:03.917+00:00

    This is available in version 1.6, which is in pre-release nuget.

    0 comments No comments

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>();


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.