Comments (4)
I investigated the geolocation API (http://dev.w3.org/geo/api/spec-source.html ) support in Content/Blink which Cameo depends on.
Background
Basically geolocation (position) data is provided by GPS sensor or location web service (client provides the WIFI, Cell or IP, server returns position).
In practice, GPS sensor is used for high accuracy, and the location web service is used for devices without GPS (such as desktop), for in-door usage or even for power saving.
As diagram [1] shows, Content/Blink uses different location providers (backends) on different platforms.
There are three types of providers implemented in Content/Blink: 1) GPS sensor based; 2) web service based,; 3) Platform/OS API based (the platform/OS API itself depends on web service or GPS sensor).
Summary
Cameo CAN reuse GPS sensor based provider for general Linux distribution and Windows 7.
Cameo CANNOT use location web service based provider unless purchasing the API key from Google.
Cameo CAN reuse the platform/OS location API based provider for Android and Windows 8. But the position data availability depends on underlying platform/OS.
Cameo NEEDS to implement platform/OS location API based provider for Tizen.
Details
- NetworkLocationProvider:
It is used by default as primary provider for all platforms except Android.
It is backed by Google Map GeoLocation Service (https://developers.google.com/maps/documentation/business/geolocation/).
To use it, Cameo or any Chromium derived products need to pay Google. (refer to http://www.chromium.org/developers/how-tos/api-keys and https://developers.google.com/maps/documentation/business/geolocation/#usage_limits) - Win7LocationProvider:
It could be enabled behind a flag (“experimental-location-features”) on Windows.
it is based on ILocation API (http://msdn.microsoft.com/en-us/library/windows/desktop/dd317674%28v=vs.85%29.aspx).
On Windows 7, the API only returns position from GPS sensor.
On Windows 8, the API could return position from both GPS sensor and Windows Location Provider which is backed by Microsoft service (http://msdn.microsoft.com/en-us/library/windows/apps/hh464919.aspx) - GpsLocationProviderLinux:
It is used on Linux to get position data from gpsd (http://www.catb.org/gpsd/) - LocationProviderAndroid:
It is used for Android solely (without NetworkLocationProvider). It is based on Android Location API (http://developer.android.com/reference/android/location/LocationManager.html).
Android system arbitrates the position data from GPS_PROVIDER and NETWORK_PROVIDER. Please note the availability of NETWORK_PROVIDER depends on Android distribution and service.
[1] Content geolocation components diagram
from crosswalk.
API spec: http://dev.w3.org/geo/api/spec-source.html
from crosswalk.
According to current implementation, validation points are:
- On Linux with GPS sensor, navigator.geolocation.getCurrentPosition should invoke successCallback with meaningful Position value. (when sensor is working, for example out-door)
- On Linux without GPS sensor, navigator.geolocation.getCurrentPosition should invoke errorCallback with POSITION_UNAVAILABLE error.
- On Windows 7 with GPS sensor, navigator.geolocation.getCurrentPosition should invoke successCallback with meaningful Position value. (when sensor is working, for example out-door)
- On Windows 7 without GPS sensor, navigator.geolocation.getCurrentPosition should invoke errorCallback with POSITION_UNAVAILABLE error.
- On Windows 8, navigator.geolocation.getCurrentPosition should invoke successCallback with meaningful Position value.
from crosswalk.
This feature has been migrated to JIRA, please track it in https://crosswalk-project.org/jira/browse/XWALK-221. Thanks
from crosswalk.
Related Issues (20)
- crosswalk-pkg windows Project template created at wrong directory HOT 2
- Crosswalk returns "Crosswalk's APIs are not ready yet" in Android API 26
- net::ERR_SUCURITY_RESPONSE When I debug an unpublished test URL(https)
- how can disable the dns cache or clear dns cache in crosswalk!
- Appear ERROR: Failed to load 'android' platform backend HOT 1
- [fixed] Object(...).values is not a function HOT 1
- SSL Pinning
- embedded crosswalk webview doesn't include brotli in accept encoding request header.
- TextureView doesn't support displaying background drawable HOT 2
- display:grid can't support HOT 1
- Android crash when restart App
- Maven Repo / Website / Mailing List is Down (2019) HOT 6
- How to make input when XwalkView run on Android Presentation
- https://download.01.org/crosswalk/releases/crosswalk/ is down HOT 1
- How to set DNS
- create an xwalkview within service
- leaked BuiltinXWalkExtensions
- SSL error
- Using Crosswalk with cordova prompts gap_init
- I can't Debug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crosswalk.