Why is geolocation plugin missing from Android plugins directory?


#1

I added some plugins through the standard command:

cordova plugin add org.apache.plugin.<name>

When I run ionic build ios, I can notice that the JS files from plugins directory at root of the ionic app are copied.

However, in the unique case of Android, the geolocation plugin isn’t moved into assets/www/plugins/....
Even, It isn’t mentioned in cordova_plugins.js.

I even dropped the whole platform, plugins directory, recreate the whole but ONLY the geolocation directory isn’t generated in Android plugins folder …

Has anyone ever experienced this?

How to fix it?


#2

I found that: https://issues.apache.org/jira/browse/CB-5977

interesting… sounds to be deprecated for Android


#3

I use ngCordova. NgCordiva supports geolocation.
Works for me in IOS and Android.

Look for ngCordova in the footer of the Ionic main webpage


#4

But I’m talking about ngCordova => I don’t figure out the point of your answer…

When did you set your Android project ? Before April 2014?
I use ngCordova for geolocation on iOS and it works great.
The issue comes with Android since the plugin has been deprecated in April 2014.


#5

HTML5 has a geolocation facilit, since Android 2.x devices should support it. The syntax is similar to Cordova plugin ( W3C Geolocation API Specification).

You need to keep the config.xml in order to continue adding the location permissions