Software Archive
Read-only legacy content
17061 Discussions

Can't Add Geolocation Plugin

Riad_H_
Beginner
248 Views

I am developing an android app that will read the coordinate data of a user through GPS. So I must add geolocation plugin. I go to project setting and add geolocation. But when I build and download the APK, this plugin doesn't work. When I extract the APK using 7zip I don't see any geolocation plugin at assets\www\plugins folder. My CLI version is 5.1.1. Need urgent help.

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
248 Views

Are you able to build and use geo with the "hello cordova" sample app? That app requires and uses the geo plugin and can be easily tested as a built app to confirm that the geo plugin was included.

0 Kudos
Riad_H_
Beginner
248 Views

Thanks @Paul. My problem has been resolved. Although there is no geolocation folder at plugin directory but it's already attached. When I print my installed plugin list by following code - 

var plugins = cordova.require("cordova/plugin_list").metadata;
alert(JSON.stringify(plugins));

it shows geolocation with version. But one problem is still remaining. I want to save some customer data with the coordinate of the place of contact. Data saved without coordinate cause to get coordinate it requires some time but meanwhile, my saving function does it's saving activities. I am now googling.. But still no luck.

0 Kudos
PaulF_IntelCorp
Employee
248 Views

I recommend you search for "cordova phonegap local storage solutions plugins" on the internet and stack overflow. The XDK makes standard Cordova (aka PHoneGap) apps, so solutions you find for Cordova and PhoneGap should also apply to the XDK.

0 Kudos
Reply