Which devices support reading geolocation speed in their browsers?

I am experimenting with GeoLocation speed readings in mobile browsers, and it would be great if there was a list of devices supporting it. The search did not help.

So far I have tested several Android 2.3 (the ones I tried to give an accurate reading of speed), IPhone 3 and 3G (both return null), iPad (returns null). What interests me more is whether this is related to the implementation of the API or the gps hardware on the device? Also, does the iPhone 4 support reading coords.speed?

+6
source share
1 answer

According to spec, the implementation should return null if read speed is not supported. They seem to do this, but some people on the Internet say that the iOS browser implemented the speed API, at least in watchPosition , see, for example. these pages .

From the spec, I also assume that you cannot reliably say if the null value means “No API Support” or “No GPS Support”. It can mean and.

In any case, I think that you better implement backups and a user-friendly notification that the device does not give you any information, rather than whitelisting / blacklisting ... based on what? UA strings are not everything, especially not that Android has alternative browsers (e.g. Firefox Mobile, Opera, ...).

0
source

Source: https://habr.com/ru/post/905828/


All Articles