Software Archive
Read-only legacy content
17061 Discussions

Android manifest question

John_F_3
New Contributor I
940 Views

I extracted the manifest from the APK built in the quest for why splash screens are so slow in appearing.

Why does it require permissions for internet and access wifi and network state? Does Cordova require them? Can they be turned off?

<?xml version="1.0" encoding="utf-8"?>

<manifest  xmlns:android="http://schemas.android.com/apk/res/android"

 android:versionCode="20001" android:versionName="0.0.1" android:installLocation="0" android:hardwareAccelerated="true" package="xdk.intel.blank.ad.template.crosswalk" platformBuildVersionCode="19" platformBuildVersionName="4.4.2-1456859">

<supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:resizeable="true" android:xlargeScreens="true">

</supports-screens>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE">

</uses-permission>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE">

</uses-permission>

<uses-permission android:name="android.permission.INTERNET">

</uses-permission>

<application android:label="@7F060046" android:icon="@7F02000A" android:debuggable="false" android:hardwareAccelerated="true">

<activity android:theme="@android:01030009" android:label="@7F060048" android:name="BlankProject" android:launchMode="1" android:configChanges="0x000004B4" android:windowSoftInputMode="0x00000010">

<intent-filter android:label="@7F060047">

<action android:name="android.intent.action.MAIN">

</action>

<category android:name="android.intent.category.LAUNCHER">

</category>

</intent-filter>

</activity>

</application>

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19">

</uses-sdk>

</manifest>

0 Kudos
4 Replies
John_H_Intel2
Employee
940 Views

What plugins do you have selected for your project?

If you turn off all plugins, and then look at the manifest if the internet access and wifi are still present, then it is Cordova that is requesting them.

I would think they would go away unless you have plugin that requires them.

0 Kudos
John_F_3
New Contributor I
940 Views

John H.

The permissions do not go away if all plugins are disabled. Got any other ideas?

We were only using device and splashscreen.  The purpose of the exercise is to determine what in the world Cordova is doing between launching the app and displaying the splash screen.  I've reviewed the code for both plugins and there does not appear a need for those permissions. For example: device

if (action.equals("getDeviceInfo")) {
  JSONObject r = new JSONObject();
  r.put("uuid", Device.uuid);
  r.put("version", this.getOSVersion());
  r.put("platform", this.getPlatform());
  r.put("model", this.getModel());
  r.put("manufacturer", this.getManufacturer());
  callbackContext.success(r);
  }
 


No where network is required.

0 Kudos
simsam7
Beginner
940 Views

From what I understand, since we're using Cordova/Phonegap here and it uses a browser (WebView/Crosswalk), the internet permission is baked in and required by default. 

It's a bit like when you want to control an Android device's flash light, and you are required to add the 'camera' permission.

 

0 Kudos
PaulF_IntelCorp
Employee
940 Views

Cordova requires the INTERNET permission, it uses that mechanism to jump "the gap" between JavaScript and native. A Cordova app that includes zero plugins will always include the INTERNET permission. The other permissions should not show up if you are using zero plugins.

0 Kudos
Reply