Skip to content
Browse files
Variable for Require GPS Hardware (#189)
* Variable for Require GPS Hardware

* docs: wording changes for installation

Co-authored-by: Martin Bech <>
Co-authored-by: Tim Brust <>
  • Loading branch information
3 people committed Mar 18, 2020
1 parent 6570cf9 commit 89cf51d222e8f225bdfb661965b3007d669c40ff
Showing 2 changed files with 7 additions and 1 deletion.
@@ -172,6 +172,11 @@ error, the `geolocationError` callback is passed a

### Android Quirks

For historic reasons, this plugin requires GPS Hardware on Android devices, so your app will not be able to run on devices without.
If you want to use this plugin in your app, but you do not require actual GPS Hardware on the device, install the plugin using the variable *GPS_REQUIRED* set to false:

cordova plugin add cordova-plugin-geolocation --variable GPS_REQUIRED="false"

If Geolocation service is turned off the `onError` callback is invoked after `timeout` interval (if specified).
If `timeout` parameter is not specified then no callback is called.

@@ -34,14 +34,15 @@ xmlns:android=""
<engine name="cordova-android" version=">=6.3.0" />
<preference name="GPS_REQUIRED" default="true"/>

<!-- android -->
<platform name="android">

<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.gps" android:required="$GPS_REQUIRED" />

<config-file target="res/xml/config.xml" parent="/*">

0 comments on commit 89cf51d

Please sign in to comment.