transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.63k stars 425 forks source link

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

Closed c-info closed 1 month ago

c-info commented 3 months ago

Your Environment

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

christocracy commented 3 months ago

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 commented 3 months ago

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

christocracy commented 3 months ago

LineageOS

Try with a standard Android device.

github-actions[bot] commented 2 months ago

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

github-actions[bot] commented 1 month ago

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