This is a migrated thread and some comments may be shown as answers.

Extra Android permissions always set

6 Answers 493 Views
AppBuilder extension for Visual Studio
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
James
Top achievements
Rank 1
James asked on 10 Jul 2014, 07:54 AM
The APK built by the cloud service has more required permissions than I set in my project settings. Here's the relevant section of my .abproject file (verified it's included in the zip):

​"AndroidPermissions": [
    "android.permission.ACCESS_COARSE_LOCATION",
    "android.permission.ACCESS_FINE_LOCATION",
    "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS",
    "android.permission.ACCESS_NETWORK_STATE",
    "android.permission.INTERNET"
  ],


And here's the set of permissions in AndroidManifest.xml in the built apk:
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.READ_CONTACTS
android.permission.WRITE_CONTACTS
android.permission.GET_ACCOUNTS
android.permission.RECORD_AUDIO
android.permission.MODIFY_AUDIO_SETTINGS
android.permission.RECORD_VIDEO
android.permission.VIBRATE

6 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 10 Jul 2014, 04:03 PM
Hi James,

These permissions are probably required by the Apache Cordova plugins used in your app.Please note that some plugins might be explicitly setting hardware permissions for your app. In order to check which ones are affecting your app, you need to examine the plugin.xml for each enabled/included plugin and look for any <uses-permission> modifications.

Here is a small list of commonly used plugins and their permission requirements:

  • Battery: Does not set additional permissions.
  • Camera: Sets WRITE_EXTERNAL_STORAGE
  • Capture: Sets RECORD_AUDIO, RECORD_VIDEO, WRITE_EXTERNAL_STORAGE
  • Device: Does not set additional permissions.
  • Device Orientation: Sets Access_coarse_location & Access_fine_location.
  • File: Sets Write_external_storage
  • Globalization: Does not set additional permissions.
  • InAppBrowser: Does not set additional permissions.
  • Media: Sets Record_audio, Modify_audio_settings, write_external_storage, read_phone_state
  • Network Information:  access_network_state.
  • Notification: Does not set additional permissions.
  • SplashScreen - Does not set additional permissions.
  • StatusBar: Does not set additional permissions.
  • Vibration: vibrate.
  • PushPlugin: Sets access_network_state, get_accounts, wake_lock, vibrate.
  • Telerik Analytics: Sets internet, access_network_State.

You can also examine the hardware permissions descriptors in this table.

Regards,
Tina Stancheva
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
James
Top achievements
Rank 1
answered on 10 Jul 2014, 08:47 PM
Thanks Tina. Removing unused plugins solved the issue.
0
Flat Rock
Top achievements
Rank 1
answered on 23 Jan 2017, 12:23 PM

Hi, 

There seems to be an issue with the permissions on android. I build a new version of my application and there a newly added permissions that are not included in any way in the config.xml or the AndroidManifest.xml. Further more the plugins that are selected in the app builder does not contain any of the wanted permissions (Contacts, Audio, Camera etc.) but they are still added. 

Please advice. Thank you for your time!

0
Martin
Telerik team
answered on 26 Jan 2017, 08:19 AM
Hi,

Apart from the permissions coming from plugins, please also make sure that there are no permissions set in the project properties for Android. Please look at .abproject if some permissions are not set (this can also be viewed if you go to your project Properties ->Android -> you are using the In-AppBrowser IDE).

You may further try switching off all plugins and building the app to further test if some of the plugins are not adding these Android permissions.

Please note that if you are building in Debug mode the following Android permissions are added in order the LiveSync to work properly (they will not be added when building in Release):
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Let me know if this has helped.

Regards,
Martin
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Flat Rock
Top achievements
Rank 1
answered on 31 Jan 2017, 07:51 AM

Hi Martin,

Thank you for your response. The permissions were set properly. Only requesting the needed once. The reason was due to the plugins section again in Properties->Android->Plugins and is now resolved.

However I'm confused why  there is no centralized way in controlling the active permissions. Why i think this is important is because you can only access device features using plugins, which from their part set other permissions and overwrite the current you have set in Permissions section. 

Thank you for your time and the provided support!

Regards,


 

0
Martin
Telerik team
answered on 02 Feb 2017, 02:38 PM
Hi,

I am glad this has helped.

As you mentioned, using plugins is essentials in Cordova applications to access device features which on other hand require setting Android permissions.

Each plugin injects its required permissions in the AndroidManifest. file during build time - this is both done for convenience (you do not need to manually enter each required permission by the used plugins) but also to make sure that all required permissions are not omitted or deliberately removed as this would cause the plugin that requires them to not work properly.

Regards,
Martin
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
AppBuilder extension for Visual Studio
Asked by
James
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
James
Top achievements
Rank 1
Flat Rock
Top achievements
Rank 1
Martin
Telerik team
Share this question
or