none
API to access to get app Privacy settings in Windows 10? RRS feed

  • Question

  • Hi All,

    I am developing library for Banking Apps. Where My Client wanted to know the sensitive resource permission status? Sensitive resources are like: Location, Camera, Microphone, Motion, Account info, Contacts, Calendar, Call History, Email, Messaging, etc... There are sensitive resources for user. App needs a user granted permission to use this resources.

    I can see these all in Windows 10 Mobile privacy settings. Do we have any API to access the app Privacy settings? Example: My app want to know the user granted status for Location, Camera, Microphone, etc...

    like Android has following:

    ContextCompat.checkSelfPermission

    iOS has following: 

    AVCaptureDevice.authorizationStatusForMediaType

    Please help me to find the API. 

    Thanks,


    Pallam Madhukar Windows Phone Developer


    Friday, February 19, 2016 11:49 AM

All replies

  • Seems there is no way presently
    Friday, February 19, 2016 12:53 PM
  • Have you tried to use read "Package.Manifest.xml" file in app?

    See this article : http://tonychampion.net/blog/index.php/2013/01/examining-the-windows-store-apps-appxmanifest-at-runtime/

    I have not test the code, but I think it would be helpful to you. 

    Monday, February 22, 2016 10:04 AM
  • Hi momomei,

    Reading Package.Manifest is only helpful to identify the required capability is declared or not.

    But I want to known the status of particular or all sensitive resource is enabled by user or not? 

    Thannks, 


    Pallam Madhukar Windows Phone Developer

    Monday, February 22, 2016 7:13 PM
  • Hi Pallam Madhukar,

    >>” I want to known the status of particular or all sensitive resource is enabled by user or not?”

    As far as I know, there’s no such API for you. Because it relates to user privacy. You would have to use the specific API to check the specific private setting.

    For example, you want to know if the user has enable the location. Then you could use the following steps to access to the user's location.

    Step 1: Request access to the user's location

    Step 2: Get the user's location and register for changes in location permissions

    var accessStatus = await Geolocator.RequestAccessAsync();
    
    switch (accessStatus)
    {
        case GeolocationAccessStatus.Allowed:
            ......
            break;
    
        case GeolocationAccessStatus.Denied:
            ......
            break;
    
        case GeolocationAccessStatus.Unspecified:
            ......
            break;
    }
    

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 2, 2016 7:41 AM
  • Thanks Xavier,

    Please can you help to find other sensitive resources API like Location?

    Thanks,


    Pallam Madhukar Windows Phone Developer

    Wednesday, March 2, 2016 9:11 PM
  • Hi Pallam Madhukar,

    You could see the windows runtime APIs from here. Because some functions were related to user privacy, so MS has not provided such API. If you could not find this API, you would have to remind your users to enable this setting manually. You would need to let them know if they have not enable these settings, the app might not work well.

    Best Regards,

    Xavier Eoro


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, March 4, 2016 5:33 AM