You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -556,14 +535,24 @@ See the [example app](example/src/App.tsx) for complete implementation examples.
556
535
557
536
## Battery Optimization
558
537
559
-
⚠️ **Important:** Background location tracking can significantly impact battery life. Consider:
538
+
The library includes built-in battery optimization features:
539
+
540
+
-**Configurable accuracy levels** - Use `LocationAccuracy.LOW_POWER` or `BALANCED_POWER_ACCURACY` for better battery efficiency
541
+
-**Adjustable update intervals** - Increase intervals to reduce battery consumption
542
+
-**Smart location updates** - Only requests location when necessary
543
+
-**Foreground service optimization** - Efficient service implementation
544
+
545
+
### Best Practices
546
+
547
+
- Use `LocationAccuracy.LOW_POWER` for long-term tracking
548
+
- Increase `updateInterval` when high-frequency updates aren't needed
549
+
- Stop tracking when not in use
550
+
- Inform users about battery usage
551
+
- Test on real devices (emulator GPS simulation is unreliable)
560
552
561
-
- Only tracking when necessary
562
-
- Stopping tracking when done
563
-
- Informing users about battery usage
564
-
- Testing on real devices (not emulators)
553
+
### Android Battery Optimization
565
554
566
-
On Android, some manufacturers (Xiaomi, Huawei, etc.) have aggressive battery optimization that may kill background services. Users may need to whitelist your app in battery settings.
555
+
Some Androidmanufacturers (Xiaomi, Huawei, etc.) have aggressive battery optimization that may kill background services. Users may need to whitelist your app in battery settings for optimal performance.
567
556
568
557
## Simulator/Emulator Support
569
558
@@ -714,12 +703,9 @@ Make sure your `tsconfig.json` includes:
0 commit comments