react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

Typo in Android timestamp metadata: systemClockElaspsedRealtime

Open ascherkus opened this issue 2 years ago • 2 comments

Your Environment

  • Plugin version: 4.12.1
  • Platform: Android
  • Plugin config
{
  enableTimestampMeta: true,
  locationTemplate: `{ "timestampMetadata": <%= timestampMeta %> }`,
}

Expected Behavior

systemClockElapsedRealtime key on Android matches that of iOS

Actual Behavior

The Android SDK has a typo (extra "s" in "elapsed"): systemClockElaspsedRealtime

Example iOS log:

"timestampMetadata": {
    "systemTime": 1697668688780,
    "time": 1697668688773,
    "systemClockElapsedRealtime": 6305610000
}

Example Android log:

"timestampMetadata": {
    "time": 1697669333265,
    "systemTime": 1697669333311,
    "systemClockElaspsedRealtime": 51993,
    "elapsedRealtime": 51946
}

Steps to Reproduce

  1. Enable enableTimestampMeta and template, if necessary
  2. Start background geolocation tracking
  3. Log the JSON results

Context

I was trying to write backend code that parses timestamp metadata and noticed Android was dropping systemClockElapsedRealtime and I tracked it down to the typo.

Said typo is present in the documentation as well.

ascherkus avatar Oct 18 '23 22:10 ascherkus

Weird.

Whatever you're doing with timestampMeta, you might be able to use the new location.age instead.

christocracy avatar Oct 18 '23 22:10 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar May 02 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar May 16 '24 01:05 github-actions[bot]