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

Background Location not detecting on few devices like Oneplus , Apple Iphone 15 pro

Open c-info opened this issue 1 year ago • 3 comments

Your Environment

  • Plugin version: 4.16.2
  • Platform: Android Oneplus 8Pro
  • OS version: 13
  • Device manufacturer/model: LineageOS version 20-20230217-microG-instantnoodlep
  • React Native version 0.71.3
  • Plugin config
BackgroundGeolocation.ready({
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
      locationUpdateInterval: 1000,
      distanceFilter: 2,
      isMoving: true,
      stopTimeout: 10,
    })
      .then(state => {
        if (!state.enabled) {
          BackgroundGeolocation.start();
        }
      })
      .catch(err => {
        console.log('Error', err);
      });

BackgroundGeolocation.getState().then(state => {
      setIsLocationEnabled(state.enabled);
    });

    const onLocationChange = BackgroundGeolocation.onLocation(
      region => {
          setCurrentRegion(region);
      },
      error => {
        console.warn('[onLocation] ERROR: ', error);
      },
    );

    const onMotionChange =
      BackgroundGeolocation.onMotionChange(setMotionChangeEvent);

    const onEnabledChange =
      BackgroundGeolocation.onEnabledChange(setIsLocationEnabled);

Expected Behavior

  1. Background location should update on location change constantly
  2. It should return updated locations constantly similar to Google map in walking mode

Actual Behavior

  1. Background location is not working on a few devices ie. Oneplus, Apple iPhone 15 Pro

Steps to Reproduce

  1. Setup basic project and run on devices given above

Context

  1. We need to show the updated user location on a map similar to the Google Maps application

c-info avatar Jun 24 '24 06:06 c-info

I’ve been field-testing daily on a number of devices almost daily for over 9 years and it never fails. My latest iOS device is an iPhone 15 Pro.

see wiki Philosophy of Operation and Debugging. Learn to observe the plug-ins incredibly verbose logs. Learn to capture the logs using .emailLog method (search the APi docs)

christocracy avatar Jun 24 '24 09:06 christocracy

Sorry, I meant @amittri post a new issue, who came here to hijack this issue.

christocracy avatar Jun 24 '24 12:06 christocracy

LineageOS

Try with a standard Android device.

christocracy avatar Jun 24 '24 16:06 christocracy

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

github-actions[bot] avatar Jul 25 '24 01:07 github-actions[bot]

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

github-actions[bot] avatar Aug 08 '24 01:08 github-actions[bot]