Background location makes app keeps stopping
See original GitHub issue🐛 Bug Report
Summary of Issue
As the title says, when I turn on location in mobile settings and open my compiled (by expo build:android
) app it closes and says APP_NAME keeps stopping
Edit: posting on api works, looks like the app is stopped after sending to api? Edit: in dev mode (in Expo) it works fine
Environment - output of expo diagnostics
& the platform(s) you’re targeting
Expo CLI 3.28.2 environment info: System: OS: Windows 10 10.0.19041 Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 npmPackages: expo: ~38.0.8 => 38.0.9 react: ~16.11.0 => 16.11.0 react-dom: ~16.11.0 => 16.11.0 react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2 react-native-web: ~0.11.7 => 0.11.7 Expo Workflow: managed
Reproducible Demo
Code - https://hatebin.com/efnfizwzbf
Expected Behavior vs Actual Behavior
Open app as normal vs keeps stopping
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Hey again,
I was searching about that
Background Fetch
you mentioned, but I don’t understand how it makes it different. I found on GitHub this example of using it https://gist.github.com/andreghisleni/a82b68c9621825e7cf5ab47f5c925661 but I don’t get where I have to get location data.As I see, there is defined task without params, but here comes question, where I need to set params. To set it in
LOCATION_FETCH_TASK
task or get somehow get it insideBACKGROUND_FETCH_TASK
task and here also send it?This issue has been automatically closed since there has not been any recent activity after it was marked as stale. Please open a new issue for any related bugs.