Skip to content

Bearing, Speed are coming as null #218

@dinakarankec

Description

@dinakarankec

Your Environment

  • Plugin version: v0.5.0-alpha.24
  • Platform: Android
  • OS version: 8.1.0
  • Device manufacturer and model: One Plus 5T
  • React Native version: 0.55.4

Context

Bearing, Speed are coming as null sometimes. It is not saving in database because of null value. it is accepting only double/float

I look into the code and found that datatype here is float and double, but it is coming as null.

BackgroundLocation.java

    private float bearing = 0.0f;
    private double altitude = 0.0f;

Expected Behavior

Bearing, Speed should be 0.

Give me a suggestion, I'm looking for a fix from the client side

Actual Behavior

Bearing, Speed are coming as null.

Steps to Reproduce

This was the response I got from the device during the post.

{
    "Speed": 1.113433,
    "Accuracy": 28,
    "Latitude": 12.96563269,
    "Longitude": 80.24624107,
    "DateTime": 1528975666000,
    "Altitude": -56.58819580078125,
    "Bearing": -1
  },
  {
    "Speed": null,
    "Accuracy": 51.343343,
    "Latitude": 12.96563394,
    "Longitude": 80.24624512,
    "DateTime": 1528975687000,
    "Altitude": -56.4327392578125,
    "Bearing": null
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleauto labeled abandoned issues after a period of inactivity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions