none
APIS for "Prompting for access to resources" in Windows 10 RRS feed

  • Question

  • Hi All,

    In windows 10 we have sensitive resources like  Location, Camera, Messaging, Recording and Contacts. found here.

    We have API for checking/requesting user granted status for Location using Geolocator.RequestAccessAsync().

    Please help me to find the API methods for Camera, Messaging, Recording and Contacts?

    Surprisingly I can access contacts without prompting any OS alert(I have checked system settings and found Contacts are "ON" by default). It seems inconstancy with the sensitive resources.

    Thanks,

    Pallam Madhukar 


    Pallam Madhukar Windows Phone Developer

    Thursday, February 25, 2016 10:03 AM

All replies

  • There is no inconsistency. Location is more sensible than camera, the 2 are not in the same league. You can use message dialogs to do this by yourself, but if the OS does not prompt, then you have to do it yourself.
    Thursday, February 25, 2016 10:26 AM
  • Hi mcosmin,

    As per MSDN documentation.

    1. Don't create your own prompt UI, as was recommended in Windows Phone 8. This will lead to double prompting for the same resource (your prompt UI plus the prompt from Windows 10).

    2. Sensitive resources that require prompts: Location, Camera, Messaging, Recording and Contacts.

    As you told both camera and location are different kind of resources. But According to MSDN documentation all sensitive resources require  prompts. So I am expecting to receive prompt for all sensitive resources.

    What I compared is Location vs Contacts. not with camera. and requesting API for all sensitive resources.

    Thanks,



    Pallam Madhukar Windows Phone Developer

    Friday, February 26, 2016 8:45 AM
  • It's a guideline. You don't have to follow it if it doesn't make sense as per requirements. If your app must provide the popups as required by your client, then go ahead and create your own popups.

    You also need to understand that the double prompting happens if and only if the OS itself does a prompt, which in the case of camera for example, it does not. On desktop it's different.

    Friday, February 26, 2016 8:51 AM
  • Hi Pallam,

    You found the correct piece of documentation for this, but you seem to have missed an important bit. You'll find this just below the table of resources:

    Important Some regions require more prompts than others. Even if a prompt is not required in your local region, always use request access APIs when available (call them from the UI thread of your foreground app before accessing the resource).

    Hope this helps!

    Friday, March 11, 2016 3:58 AM