Android permissions, bare minimum

Hey,

My app literally just needs access to http:// (in/out) and local storage for tokens etc. What’s the bare minimum permissions I can get away with?

Currently the manifest asks for basically everything under the sun and it feels a bit excessive.

Cheers

Hey,

Take a look and read about EvaluateJS.

I would suggest using FileSystem for data storing.

Hope this helps.

The permissions we hardcode are:

  • WAKE_LOCK
  • WRITE_EXTERNAL_STORAGE
  • INTERNET
  • ACCESS_NETWORK_STATE
  • VIBRATE

The rest will have been added by something.

Fuse.Launcher for example will add a bunch of permissions but it’s subprojects Fuse.Launcher.Email, Fuse.Launcher.InterApp, Fuse.Launcher.Maps & Fuse.Launcher.Phone can be used seperately to reduce the number of permissions touched.

For example the unoproj for one test project I have looks like this:

{
    "Packages": [
        "Fuse",
        "FuseJS",
        "Fuse.CameraRoll",
    ],
    "Includes": [
        "*"
    ]
}

and the permissions section of the manifest looks like:

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    

Great, thanks Chris! Now to find out what the “something” is :slight_smile:

Chris Bagley wrote:

Fuse.Launcher for example will add a bunch of permissions but it’s subprojects Fuse.Launcher.Email, Fuse.Launcher.InterApp, Fuse.Launcher.Maps & Fuse.Launcher.Phone can be used seperately to reduce the number of permissions touched.

Ok, so I think you’ve hit the nail on the head here. I have a reference to Fuse.Luncher, because I have some buttons that takes the user to a website, in their default browser. Namely via <LaunchUri Uri="<URL>" />.

When I replace the Fuse.Launcher reference with Fuse.Launcher.InterApp it runs fine internally (where those <LaunchUri /> buttons don’t do anything anyway), but fails to build for Android with the following output:

.uno/ux14/MainView.g.uno(251.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Email'. Could you be missing a package reference?
.uno/ux14/MainView.g.uno(253.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Maps'. Could you be missing a package reference?
.uno/ux14/MainView.g.uno(254.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Phone'. Could you be missing a package reference?
.uno/ux14/MainView.g.uno(251.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Email'. Could you be missing a package reference?
.uno/ux14/MainView.g.uno(253.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Maps'. Could you be missing a package reference?
.uno/ux14/MainView.g.uno(254.43): E3111: Fuse.Reactive.FuseJS does not contain type or namespace 'Phone'. Could you be missing a package reference?

EDIT: Seems like uno clean took care of it :slight_smile: