Search code examples
androidcordovagoogle-playcordova-plugins

cordova-plugin-geolocation causes 1k of device unsupported


Today I do testing to find out why there is a lot of devices unsupported on Google Play Store for my app. After some finding, I found out that as soon as I add cordova-plugin-geolocation plugin into my app, the supported device drop for 1K.

The cordova-plugin-geolocation plugin is important for my app. Why there is so many unsupported device after adding this plugin? How can I reduce the number of unsupported device cause by this plugin? Any other alternative plugin for geolocation detection?


Solution

  • I assume that Cordova has a permission, which in turn requires a feature, that is not supported on the 1k devices. If you can figure out which feature, then you can set the feature as optional using the uses-feature optional directive. For example, for allowing on non phones you use <uses-feature android:name="android.hardware.telephony" android:required="false"/> Remember, once you set it as optional, it is your responsibility to check for feature before using it, otherwise app will crash.