- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My Android APK has been OK unchanged to date at the Amazon AppStore. However they now need more detailed settings in the manifest:
The geolocation plugin adds
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
The Amazon doc says the manifest needs these feature specs in the manifest if the GPS is optional:
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
Is there any way to add these?
Thanks, Chris
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chris, you can clone the geo plugin and modify it or create a "dummy plugin" that consists of only a plugin.xml file to add those features into the AndroidManifest.xml file. See the "config-file" element about halfway down this doc page: https://cordova.apache.org/docs/en/5.1.1/plugin_ref/spec.html. I haven't verified this, but a plugin.xml file that contains something like this (borrowed from the existing geo plugin.xml file):
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-geolocation-manifest-addon"
version="0.0.1"
>
<name>Geolocation Manifest Addon</name>
<description>Cordova Geolocation Manifest Addon Plugin</description>
<license>MIT</license>
<!-- android -->
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
</config-file>
</platform>
</plugin>
Then, use the add local plugin with the plugin manager to copy this "plugin" to your project.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
When you add geolocation plugin in your project these default permissions are being added during that time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I know that - but it's the extra uses-feature manifest entries that are needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Chris, you can clone the geo plugin and modify it or create a "dummy plugin" that consists of only a plugin.xml file to add those features into the AndroidManifest.xml file. See the "config-file" element about halfway down this doc page: https://cordova.apache.org/docs/en/5.1.1/plugin_ref/spec.html. I haven't verified this, but a plugin.xml file that contains something like this (borrowed from the existing geo plugin.xml file):
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-geolocation-manifest-addon"
version="0.0.1"
>
<name>Geolocation Manifest Addon</name>
<description>Cordova Geolocation Manifest Addon Plugin</description>
<license>MIT</license>
<!-- android -->
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
</config-file>
</platform>
</plugin>
Then, use the add local plugin with the plugin manager to copy this "plugin" to your project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Paul - I'll give that a go
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page