Comments (5)
Calling requestPermission() appears to only work once after the user makes their choice. After that he would have to manually go to the settings to activate the permissions again.
That’s correct. The OS gives you one shot to show the native permission dialog provided by the OS. The OS will not spam the user. If the user denies your request, it’s up to you to produce your own dialog and ask the user to “pretty please” enable desired permissions in your app Settings.
listen to .onProviderChange event to learn the current state of permissions.
from react-native-background-geolocation.
So in this case, if there are changes in permissions with monitoring already active, onProviderChange will identify this change and in this case, if the permission is denied, could I call stop()?
from react-native-background-geolocation.
if the permission is denied, could I call stop()?
Why don’t you try it and see?
from react-native-background-geolocation.
ok, I'll do some tests. Thanks!
from react-native-background-geolocation.
Hi Chris, based on your experience with the plugin, if the user removes permissions when tracking is in progress in the background or with the application closed, it is better to call stop() to stop tracking or I can wait until it starts again location permissions? I'm worried if the connected plugin will consume battery even when it's without permissions.
Thanks!
from react-native-background-geolocation.
Related Issues (20)
- Tried to finish non-existent task with id x
- Android Application Not Responding when the library checks permissions
- Manually request motion permissions HOT 1
- getLocations type error HOT 1
- Problem in handling permissions using onProviderChange. Two scenarios I am facing the issue
- `- BackgroundGeolocation is configured and ready` never logs true in the example code HOT 7
- User Arrow Direction on Android Often Misrepresents Users Walking/Facing Direction HOT 1
- Can not debug on android HOT 7
- Could not find any matches for com.transistorsoft:tslocationmanager-v21:+ as no versions of com.transistorsoft:tslocationmanager-v21 are available. HOT 11
- Do I need to buy the source code of this TSLocationManager? HOT 1
- How to use the TSLocationManager static library? HOT 1
- Background location didn't respond if I stops for certain minutes and then moving again HOT 5
- Discussion: Time-based Tracking and backgrounded app HOT 1
- LocationRequestService ANR on Android 14 HOT 10
- License Validation Issue After Upgrading React Native and react-native-background-geolocation (Android Only) HOT 3
- Battery Drain Issue (IOS) HOT 5
- Enter/exit geofence is not detected in trackingMode Geofences only (iOS) HOT 7
- Why is event optional?
- How do I initially (before reaching 200m) record positions accurately? HOT 1
- Continuous Location Tracking in Background for Android and iOS HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-background-geolocation.