Updating ACCESS_FINE_LOCATION Permissions Using Feature Function in Ionic Mobile App

I recently received a notification from Google asking me to update the way we are announcing the use of built-in geolocation in the application.

In Ionic (v1), a cord-plugin-geolocation 2.3.0 "Geolocation" is installed. Line declared in AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Google tells us to use instead:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" android:required="false">
  • Is there any clean way to paste it into AndroidManifest.xml?
  • Should it be with a hook?
  • Do I have to wait for cordon plugin geolocation plugin updates to meet Google recommendations?
+4
source share
2 answers

Android config.xml :

<platform name="android">
<config-file target="AndroidManifest.xml">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" android:required="false">
</config-file>
</platform>

, unbound prefix's, xmlns:android="http://schemas.android.com/apk/res/android" config.xml

:

<widget xmlns     = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        xmlns:android   = "http://schemas.android.com/apk/res/android"
        id        = "com.akis.android"
        version   = "0.1"
+1

cordova-plugin-geolocation, 2.4.0 .

+2

Source: https://habr.com/ru/post/1655491/


All Articles