Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
c-info opened this issue Jun 24, 2024 · 3 comments

Comments

@c-info
Copy link

c-info commented Jun 24, 2024

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
@christocracy
Copy link
Member

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)

@transistorsoft transistorsoft deleted a comment from c-info Jun 24, 2024
@transistorsoft transistorsoft deleted a comment from c-info Jun 24, 2024
@transistorsoft transistorsoft deleted a comment from amittri Jun 24, 2024
@christocracy
Copy link
Member

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

@christocracy
Copy link
Member

LineageOS

Try with a standard Android device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants