Android Location Provider Configuration
Fixing "NETWORK provider disabled" errors in Xopoz power save mode
⚠️ Common Issue
When Xopoz enters power save mode to conserve battery, it attempts to switch from GPS to Network location provider. If the Network provider is disabled, location tracking completely stops until the next motion event.
Problem Symptoms
- Complete location blackout when screen turns off
- Log message:
"NETWORK provider disabled - cannot enter power save mode"
- GPS status changes to
DISABLED instead of POWER_SAVE
- Team members lose visibility of your location
Root Cause
Android's location providers can be individually disabled at the system level. Even if GPS is enabled, the Network location provider (used for cellular tower triangulation) might be turned off, preventing power save mode from working correctly.
Diagnostic Commands
Step 1: Check Current Provider Status
First, verify which location providers are currently enabled on your device:
D:\Prog\Xopoz> adb shell settings get secure location_providers_allowed
Expected Outputs
Correct Configuration
gps,network
Both GPS and Network providers are enabled - power save mode will work correctly.
Problem Configurations
gps
Only GPS enabled - Network provider missing, causing power save mode failure.
null
No providers configured - complete location system failure.
Solution: Enable Both Providers
Step 2: Configure Location Providers
Enable both GPS and Network location providers using ADB:
D:\Prog\Xopoz> adb shell settings put secure location_providers_allowed gps,network
Step 3: Verify Configuration
Confirm the change was applied successfully:
D:\Prog\Xopoz> adb shell settings get secure location_providers_allowed
gps,network
✅ Success Indicators
After applying the fix, you should see these log messages when screen turns off:
LocationService I TryToDecreasePower
LocationService I stopLocationMonitor: GPS + NETWORK updates stopped
LocationService I powerModeSave - Network-only tracking
LocationService I Network-only updates started successfully
GpsLocationEngine I SET GPS STATUS CHANGED: ACTIVE → POWER_SAVE
How Power Save Mode Works
Battery Optimization Strategy
- Active Mode: GPS + Network providers active (high accuracy, high battery usage)
- Stationary Detection: No movement for 5+ minutes
- Power Save Trigger: Screen off or device idle events
- GPS Deactivation: GPS chip powered down for battery savings
- Network Fallback: Cellular tower triangulation maintains basic location (lower accuracy, much lower battery usage)
- Motion Recovery: Significant motion detector triggers return to active mode
Alternative GUI Method
If ADB commands are not available, you can enable Network location through Android Settings:
- Open Settings → Location
- Tap Advanced or Google Location Services
- Enable Google Location Accuracy or Improve Location Accuracy
- Ensure both Wi-Fi scanning and Bluetooth scanning are enabled
⚠️ Corporate/Privacy-Focused Devices
Some corporate-managed devices or privacy-focused ROMs may have Network location permanently disabled for security reasons. In such cases, Xopoz will fall back to GPS-only operation with reduced battery optimization capabilities.
Troubleshooting
If the problem persists:
- Restart Xopoz app after applying the configuration change
- Check if Google Play Services is installed and up-to-date
- Verify location permissions are granted to Xopoz
- Test power save mode by turning screen off and monitoring logs