radimitrov / CSharpShellApp

77 stars 18 forks source link

Open Options for Permissions in example #355

Closed Alisis33 closed 3 weeks ago

Alisis33 commented 6 months ago

It would be useful if the permission example would include a code to open the options where the permissions could be switched on.

(I woul be happy for a examle for the old pre Maui code, because my codes still not work with the new version. A work still with the old cshell because of multiple issues.)

radimitrov commented 6 months ago

There is no such example because the pre MAUI version (Xamarin.Forms) automatically requested any declared permissions. This isn't applicable in the newer versions as detailed in the APK permissions section and the permissions example. Summary: Permissions can only be requested from Activity, however users often try to do that before it is open (MauiProgram.cs vs MainPage.cs).

radimitrov commented 6 months ago

As for opening the app setting and therefore permissions screen this is the way. After Activity startup, I think.