Skip to content

Commit

Permalink
Add speed to UserLocation (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Berthet <vincent@web-74.com>
  • Loading branch information
vberthet and Vincent Berthet authored Oct 5, 2021
1 parent db93ccc commit e404e4d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ private void onUserLocationUpdate(Location location){
userLocation.put("position", new double[]{location.getLatitude(), location.getLongitude()});
userLocation.put("altitude", location.getAltitude());
userLocation.put("bearing", location.getBearing());
userLocation.put("speed", location.getSpeed());
userLocation.put("horizontalAccuracy", location.getAccuracy());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
userLocation.put("verticalAccuracy", (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) ? location.getVerticalAccuracyMeters() : null);
Expand Down

0 comments on commit e404e4d

Please sign in to comment.