question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to fetch location when app is terminated in Android

See original GitHub issue

Your Environment

  • Plugin version:^0.6.3"
  • Platform: Android
  • OS version: 10
  • Device manufacturer and model:
  • Running in Simulator:
  • React Native version: 0.61
  • Plugin configuration options:
    desiredAccuracy: BackgroundGeolocation.MEDIUM_ACCURACY,
    stationaryRadius: 0,
    distanceFilter: 0,
    notificationTitle: ' Location',
    notificationText: 'فعال',
    debug: false,
    startOnBoot: true,
    stopOnTerminate: false,
    locationProvider: BackgroundGeolocation.ACTIVITY_PROVIDER,
    interval: 5000,
    fastestInterval: 5000,
    activitiesInterval: 5000,
    stopOnStillActivity: false,
    startForeground: true,

Context

i have used stopOnTerminate and set this value to false but i am not able to get location coordinates when app is terminated in Android ?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
dfg31197commented, Feb 22, 2021

I’ve created fork to support Android SDK 29+ https://github.com/darron1217/react-native-background-geolocation

It doesn’t seem to solve the issue. Plus now, after killing and reopening the app, location doesn’t work

1reaction
darron1217commented, Feb 16, 2021

I’ve created fork to support Android SDK 29+ https://github.com/darron1217/react-native-background-geolocation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does flutter_background_geolocation fetch the location even ...
It does work even when the app is terminated. it is called headless mode in android. I have tested in android and seems...
Read more >
Get location every minute while app is terminated
Hi ,. I am working on a project, in which we need to access location of user every time whatever app is in...
Read more >
Requesting access to location in the background
You can find the form here manually by going to the App Content page, clicking Start under “Sensitive App Permissions,” then clicking Start...
Read more >
How do I track user location even after the app is terminated?
The best way to see what this looks like is to just start turn-by-turn navigation in any existing app on your iOS device...
Read more >
React native background location (terminated app) - Jan Demel
Track users location in React Native app without a running app. Works for terminated, killed or background application.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found