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

I would like to receive location information periodically (1 minute).

Open lane4-wiz opened this issue 1 year ago • 0 comments

Your Environment

  • Plugin version: 4.17.1
  • Platform: Android
  • OS version: 10
  • Device manufacturer / model:
  • React Native version (react-native -v): 0.72.6
  • Plugin config

heartbeatInterval: 60,

BackgroundGeolocation.onHeartbeat(event => {
        console.log('[onHeartbeat] ', dayjs().format('YYYY-MM-DD HH:mm:ss'), event);
        BackgroundGeolocation.getCurrentPosition({
          timeout: 30,
          maximumAge: 5000,
          samples: 1,
        }).then(location => {
          console.log('[getCurrentPosition] ', location);
        });
      }),

Expected Behavior

It was implemented to receive location information every minute using heartbeat, but there are many cases where location information cannot be received within 1 minute.

Is there a way to receive location information with less error every minute?

Actual Behavior

Steps to Reproduce

Context

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

lane4-wiz avatar Oct 21 '24 01:10 lane4-wiz