how to manually specify the required permissions?

261 views
Skip to first unread message

Riski Idrus

unread,
Jun 15, 2022, 2:11:57 AM6/15/22
to DroidScript
hi, I know that droidscript scans my app code for a list of what permissions it requires, but is there a way to do it manually?

Steve Garman

unread,
Jun 15, 2022, 3:40:52 AM6/15/22
to DroidScript
If you want to add extra permission groups to your app you can use _AddPermissions in the main file of your app

An extreme example would be:

_AddPermissions("Share, USB, Network, Camera, Location, SMS, WakeLock, Shortcut, Vibrate, License, Bluetooth, Storage, Contacts, SmartWatch2, Sounds, Vending, Record, Phone, Accounts, Boot, Body")

This can be in a comment or in your OnStart function

To remove individual permissions you can use a build.json file

Riski Idrus

unread,
Jun 15, 2022, 5:32:33 AM6/15/22
to DroidScript
how about getting rid of the permission request dialog to the user when a new user runs the app for the first time?

In my opinion, this is not a good practice. because my app usually notify the user first before asking for any permission.

Steve Garman

unread,
Jun 15, 2022, 6:07:57 AM6/15/22
to DroidScript
That's another job for the build.json file

{
  "manifest": {
    "removePermissions": "WRITE_EXTERNAL_STORAGE"
  },
  "autoPermissions": false
}

You will then have to request all permissins yourself before using them

Steve Garman

unread,
Jun 15, 2022, 6:10:36 AM6/15/22
to DroidScript
Some or all of that may require premium. I can't check at the moment 
Reply all
Reply to author
Forward
0 new messages