Search Unity

Removing permissions besides editing AndroidManifest

Discussion in 'Android' started by Cuicui_Studios, Oct 10, 2019.

  1. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    72
    Hi there guys!

    We've been doing some thinning on a project that has a lot of stuff related to the android device (including web access, handheld vibration, and so on) and we are facing some issues removing the permissions.

    What we cannot achieve:
    Remove all the permissions that the app requires prior to installing. We have successfully removed many of the permissions (dim screen, and others), but there are some that persist:
    • Vibration
    • Internet access
    • com.google.android.c2dm.permission.RECEIVE
    What we've done:
    So, we've searched far and wide and checked some unity answers and forums, stack overflow, google, etc..
    In case of the vibration: we've removed all the Handheld.vibrate() calls within the code. Is there any other function or call that may be requiring that permission?
    In case of internet: We've removed all WWW calls, including WWWForms and all internet related calls. We've also removed all the Application.openURL calls. We are not creating Development builds, but still we cannot uncheck the Internet Access value in the Player Settings, so we are kind of lost here. Do you guys knos any other functions that may be causing the problem?
    In case of the c2dm thingy: We've come across some posts indicating that this is some old notification system but we're not sure if there's something within our project using it (it's an old project).
    We've read that some people just export the project to eclipse and then edit the AndroidManifest and copy it back to unity, but that seems kind of weird.
    We are using Unity 2018.4.2f1. Can you guys give us some advice?
    Thanks in advance!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If you're in a hurry, you'll probably want to follow the advice and export to Gradle, then open the project in Android Studio and edit the manifest and build from there, and is what I do in such situations. Also, you can use the Android Studio feature Analyze APK... to see the permissions.
     
    Cuicui_Studios likes this.
  3. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    72
    Ok, thanks @JeffDUnity3D . We'll have a look at the Analyze APK.