Skip to content

Commit

Permalink
Add speed to UserLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Berthet committed Sep 14, 2021
1 parent d5c57f5 commit 533868a
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 533868a

Please sign in to comment.