- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What different in Cordova API and Intel XDK API?
I want use geolocation, what do i should use: geolocation.getCurrentPosition or intel.xdk.geolocation.getCurrentPosition?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should stick to the cordova api's. The intel.xdk api are older and not as maintained as the cordova api's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for answer!
I tried to change intel.xdk.geolocation.getCurrentPosition to navigator.geolocation.getCurrentPosition and Intel XDK Emulator GeoLocation not work more:
PositionError {message: "Timeout expired", code: 3, PERMISSION_DENIED: 1, POSITION_UNAVAILABLE: 2, TIMEOUT: 3}
Can I fix this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you update which plugins you are using in the project settings? You can do so under the Projects tab in the xdk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I open Plugins section in Projects tab. Standart Cordova Plugins - Geolocation 0.3.11 selected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See the demo that we provide on geolocation. Start a new project, Samples and Demos, HTML5 + Cordova, Geolocation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried and got the same:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Works for me :) Are you connected to the internet?
Does it work on device for you?
Could your firewall be blocking the XDK from connecting to the internet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try to run app on the actual device instead of in the emulator. i can get the location once deploy to actual device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Emulate tab and the geo API is kind of tricky if you set it to use an Android device. It is easier to play with if you tell the Emulate tab to use an iOS device. It has to do with the way the Emulate tab interprets the geo JS files for Android. It will work better on a real device.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page