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

Android background geolocation #255

Open
dukvanduken opened this issue Jun 2, 2023 · 7 comments
Open

Android background geolocation #255

dukvanduken opened this issue Jun 2, 2023 · 7 comments
Labels
question Further information is requested

Comments

@dukvanduken
Copy link

Hi there!
I tried to find free solution for background location for Android RN app and used this react-native-geolocation lib.

But it seems it not support background geolocation. I used this code:
`
useEffect(() => {
Geolocation.setRNConfiguration({
skipPermissionRequests: false,
locationProvider: 'android',
})

Geolocation.watchPosition(
  ({ coords: { latitude: lat, longitude: lon }}) => {
    // my code here...
  },
  (error) => console.error(error),
  { interval: 1000, enableHighAccuracy: true, distanceFilter: 1 },
)

}, [])
`

It works fine but only app is in focus.
Backgrounded app do not watch for position.

I saw this module https://github.com/transistorsoft/react-native-background-geolocation but it's paid and I want to use this lib.

Do I have any possibilities to get background location?

@dukvanduken dukvanduken added the question Further information is requested label Jun 2, 2023
@GabrielDuarteJr
Copy link

+1

@JB712
Copy link

JB712 commented Jun 28, 2023

Also interested ✋

@DeveloperMCD
Copy link

I need this as well!

@JB712
Copy link

JB712 commented Jun 29, 2023

A workaround is provided in PR #247, if you want to patch it by yourself

@thtRajasthaniGuy
Copy link

+1

@michalchudziak
Copy link
Owner

I'll try to work on this feature when I'll have some spare time :)

@NgVSang
Copy link

NgVSang commented Sep 18, 2023

+1

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

No branches or pull requests

7 participants