Battery Optimization
Android’s battery optimization can pause or stop Network Survey when running in the background, causing gaps in your survey data. Disabling this feature ensures continuous, reliable surveys.
Why This Matters
Section titled “Why This Matters”When battery optimization is enabled:
- Surveys may stop unexpectedly
- Data gaps occur in your logs
- Background surveys won’t work reliably
- MQTT/gRPC streaming may disconnect
Solution: Disable battery optimization for Network Survey.
Quick Setup
Section titled “Quick Setup”Network Survey will prompt you to disable battery optimization after the initial setup.
- When prompted, tap “Open Settings”
- Find Network Survey in the list
- Select “Don’t optimize” or “Allow”
- Return to the app
Done! Your surveys will now run reliably in the background.
In App Setup (If You Missed the Prompt)
Section titled “In App Setup (If You Missed the Prompt)”- Open Network Survey
- Tap the Menu button in the top left corner
- Tap Settings
- Tap Battery Optimization
- Follow the prompt instructions
Manual Setup (If You Missed the Prompt)
Section titled “Manual Setup (If You Missed the Prompt)”Android 6-11
Section titled “Android 6-11”- Open Settings → Battery
- Tap Battery Optimization or the ⋮ menu → Battery optimization
- Tap the dropdown → Select “All apps”
- Find Network Survey
- Select “Don’t optimize”
- Tap Done
Android 12+
Section titled “Android 12+”- Open Settings → Apps → Network Survey
- Tap Battery
- Select “Unrestricted” (best for surveys)
- Alternative: “Optimized” (may cause issues)
- Avoid: “Restricted” (will stop surveys)
Manufacturer-Specific Settings
Section titled “Manufacturer-Specific Settings”Some manufacturers add extra battery restrictions beyond Android’s standard settings.
Samsung Devices
Section titled “Samsung Devices”- Settings → Apps → Network Survey → Battery
- Enable “Allow background activity”
- Settings → Device care → Battery → Background usage limits
- Remove Network Survey from restricted apps
Xiaomi / MIUI
Section titled “Xiaomi / MIUI”- Settings → Apps → Manage apps → Network Survey
- Battery saver → Select “No restrictions”
- Autostart → Enable
- Settings → Battery & performance → App battery saver
- Choose “No restrictions” for Network Survey
Huawei / EMUI
Section titled “Huawei / EMUI”- Settings → Battery → App launch
- Find Network Survey → Disable “Manage automatically”
- Enable “Auto-launch”, “Secondary launch”, “Run in background”
OnePlus / OxygenOS
Section titled “OnePlus / OxygenOS”- Settings → Apps → Network Survey → Battery
- Select “Don’t optimize”
- Battery optimization → “Don’t optimize”
How to Verify It’s Working
Section titled “How to Verify It’s Working”After disabling battery optimization:
- Start a survey
- Lock your screen
- Wait 30-45 minutes
- Check your log files
Good: Continuous data with regular timestamps Problem: Gaps in timestamps indicate the app was paused
Battery Optimization vs. Battery Life
Section titled “Battery Optimization vs. Battery Life”Will disabling optimization drain my battery faster?
Network Survey uses a wake lock when surveys are active, which does consume more battery. However:
Tips to Balance Battery Life:
- Increase scan intervals (Settings → Scan rates)
- Disable technologies you’re not using
- Use external power for long surveys (car charger, power bank)
- Stop surveys when not needed
Troubleshooting
Section titled “Troubleshooting”App Still Stops in Background
Section titled “App Still Stops in Background”- Double-check battery optimization is disabled
- Check manufacturer settings (see above)
- Grant background location permission (Settings → Permissions → Location → “Allow all the time”)
- Disable Android’s “Battery Saver” mode (restricts all apps)
- Check “Data Saver” mode (may affect network-dependent features)
Survey Shows “Paused”
Section titled “Survey Shows “Paused””If you see “Paused” in the survey monitor or Dashboard:
- Low battery pause: The battery dropped below the configured threshold (Settings → Pause scanning on low battery)
- Airplane mode: Cellular scanning pauses when airplane mode is active
Related
Section titled “Related”- Required Permissions - All permissions explained
- Quick Start Guide - Start your first survey
- Scan Rate Configuration - Scan intervals and battery life