Disable Location Permission

Jassim Al Rahma 26 Reputation points
2022-05-28T10:37:23.61+00:00

Hi,

In Xamarin, how can I disable the Location permission for both iOS and Android?

Thanks,
Jassim

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,247 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ELBANNOUNI.MOHAMMED 81 Reputation points
    2022-05-28T11:32:44.187+00:00

    Vous pouvez contrôler les informations de localisation que votre téléphone peut utiliser. Ouvrez l’application Paramètres de votre téléphone. Sous « Personnel », appuyez sur Accès à la localisation. En haut de l’écran, activez ou désactivez l’accès à ma position.

    0 comments No comments

  2. Sreeju Nair 11,606 Reputation points
    2022-05-29T07:57:33.91+00:00

    In XAMARIN, you may define the application wide permission for your app by using Manifest. See the following references:

    Android: https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/permissions?tabs=windows
    iOS: https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/security-privacy?tabs=windows

    If you want to revoke the permission for your app, you can update the info.plist (for iOS) or in the Android Manifest.

    It is also possible to request permission by code. For e.g. developers use [Xamarin.Essentials][1] to manage the permissions in the code. Your application need to request for permissions in your app. See the following references

    https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/security-privacy?tabs=windows
    https://learn.microsoft.com/en-us/xamarin/essentials/permissions?tabs=android

    You may need to refer your code to see to see whether your application is requesting permissions through code.

    Hope this helps

    0 comments No comments