How can I use a PhoneGap plugin that is no longer supported?

183 views Asked by At

I am using this plugin to check if GPS is enabled or disabled:

https://github.com/fastrde/cordova-plugin-fastrde-checkgps

But when compiling the app it says that the plugin is no longer supported. How can I still use this code/plugin in the app? I am lost :(

Here is the error:

Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "[email protected]" via npm Installing "cordova-plugin-fastrde-checkgps" at "1.0.0" for android Failed to install 'cordova-plugin-fastrde-checkgps': CordovaError: Version of installed plugin: "[email protected]" does not satisfy dependency plugin requirement "cordova-plugin-geolocation@^1.0.1".

Or does anyone have any alternate suggestions?

1

There are 1 answers

0
Will On

This worked for me:

  1. Download the plugin from the repository as a zip.
  2. Extract the zip.
  3. Open the plugin.xml file that is located inside of the folder in your favorite text editor or IDE
  4. Find this line <dependency id="cordova-plugin-geolocation"version="1.0.1" /> and replace with this <dependency id="cordova-plugin-geolocation"/>

  5. Now, install the plugin. The path should be the same folder that extracted. cordova plugin add C:\User\Desktop\cordova-plugin-fastrde-checkgps-master