- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Geolocation api plugin(core plugin of intel xdk) is not working in the android versions <=4.3.
I am not able to find latitude and longitude coordinate position of device using this plugin in android <=4.3 version .
Please help me to resolve this issue or tell me another way to find latitude and longitude position in android <=4.3 version.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi We need more info, can you post a sample of your code calling the GeoLocation.
Try setting enableHighAccuracy: true if you haven't already.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using Android 4.1.1 and works perfect!
using this code:
if (navigator !== null) { if (navigator.geolocation) { var options = { enableHighAccuracy: true, timeout: 15000, maximumAge: 0 }; try { navigator.geolocation.getCurrentPosition(function (position) { // do something with: position.coords.latitude & position.coords.longitude }, function () { // position not found }, options); } catch (e) { // ooops } } }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey nick ,
Thank you for giving time for my issue , but the the solution you told me doesn't work me .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Ad ,
Thank you for giving time for my issue , i have tried your solution but not working for me am i doing something wrong?
I am using
a) cordova 4.1.2 cli
b) using a crosswalk build with target api level 18
c) using Geolocation core plugin
It work great on emulater but not working on android 4.3 and below but working fine on android 4.4 and above
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have been able to replicate the issue on Android 4.2.2, No Geolocation data is returned. Android 4.4.4 is fine and returns geolocation details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend using Apache Cordova Geolocation plugin as we have deprecated various Intel XDK api such as the Geolocation plugin. For more information visit https://software.intel.com/en-us/xdk/docs/intel-xdk-api-cordova-plugin-methods-properties-events.
Also, I recommend building a Crosswalk-Android application as this will provide support for Geolocation support for all Android 4+ devices. This build target provides a Chromium web runtime that makes the latest HTML5 features to any Android 4+ devices instead of relying on the native web runtime which can vary in their HTML5 feature support.
The Geolocation plugin is based on the W3C Geolocation API Specification, and only executes on devices that don't already provide an implementation. For more information visit https://github.com/apache/cordova-plugin-geolocation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Elroy Ashtian, Jr.
Thank you so much for giving me your time on my issue , But sir this plugin is not getting installed in intel xdk am i doing something wrong please help me . I am getting this error:Error: Plugin Geolocation failed to install.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Further to my last comment.
I am using the Cordova plugin and building with Crosswalk, I cannot get a GPS location on Android 4.2.2, the same code on 4.4.4 works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey Nick ,
But it is not working on ma android 4.3 device am i doing something wrong .
The same solution is working for android devices 4.4 and above
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick F. wrote:
Further to my last comment.
I am using the Cordova plugin and building with Crosswalk, I cannot get a GPS location on Android 4.2.2, the same code on 4.4.4 works fine.
I have made a small test project, using my GPS code above, with the following settings:
Plugins: cordova-plugin-geolocation 1.0.1
Build: Android Crosswalk
Cordova CLI: 5.1.1
Min Android API: 14
Target Android API: 19
Crosswalk runtime: embedded 15
After compiling as Android Crosswalk,
and installed the ARM code on my ODYS Prime tablet (Android version 4.2.2),
I'm getting GPS coordinates!
It doesn't solve your problem, but it maybe helps you one step further....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bhavya, try the "hello Cordova" app, it contains an extensive Geo test that should help you figure out what is working and what is not. Also, check to be sure that geo is enabled on the test device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ad, @Paul, @ Nick ,@Elroy Ashtian Jr.
Thank you every one for helping me on this issue . @Ad your solution worked for me
Thanks ,
Bhavya Anand
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page