Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

User Permissions

Discussion in 'Android' started by Adrianoooz, Apr 20, 2020.

  1. Adrianoooz

    Adrianoooz

    Joined:
    Jan 15, 2019
    Posts:
    12
    Hey everyone!
    So, I'm working on an augmented reality application. I'm working with AR foundation SDK. After my application starts, it asks me only for "video capture and image capture" permission. I guess those request are hidden somewhere inside the SDK that i'm using.
    The problem is, that I want to use GPS inside my app, so I also need "location" permission. I wrote a simple GPS script, which works, but I have to manually set the permissions (inside android options-->app-->permissions) for GPS to work. I tried everything, but I just can't make it work.. I want my app to ask me for multiply permissions.

    upload_2020-4-20_13-49-55.png

    Here is my UnityManifest file, which I found in this directory: <project_name>\Temp\StagingArea

    Also, what I'm wondering is why can't I see "video capture and image capture" permission in manifest file? If my app asks me for this permissions, shouldn't it be declared in manifest?

    Thanks alot in advance!
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    824
    See this manual page https://docs.unity3d.com/Manual/android-RequestingPermissions.html about how to request permissions when you need them.
    The manifest that you've found in StagingArea is the main manifest, it's not the final manifest. The manifests from plugins are merged into it when building the application. So the other permissions that you don't see here but are in the final manifest will be declared in plugins.
     
  3. Adrianoooz

    Adrianoooz

    Joined:
    Jan 15, 2019
    Posts:
    12
    Thank You for the fast reply Julius!

    I tried it, it just doesn't work.

    Plugins folder is empty, did You mean this folder: C:\Unity_Projects\<project_name>\Temp\StagingArea\plugins ?

    Maybe those permissions are added in the runtime, so I can't explicitly see it?

    Thank you!