zamojski / TowerCollector

The OpenCellID and MLS contributor's app.
Mozilla Public License 2.0
217 stars 27 forks source link

The problem with updating the map over Wi-Fi #137

Closed sequtan closed 2 years ago

sequtan commented 3 years ago

When the option to update the map only via Wi-Fi is activated, the map is not updated when Wi-Fi is connected to the Internet. Tablet based on Android 6.0.1.

zamojski commented 3 years ago

To be precise, it detects if the network connection is metered or not. Typically WiFi is not metered but if you use a hotspot from mobile phone it may be metered.

NetworkRequest.Builder networkRequestBuilder = new NetworkRequest.Builder()
                .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
                .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
            networkRequestBuilder.addCapability(NetworkCapabilities.NET_CAPABILITY_TEMPORARILY_NOT_METERED);
        }

Can you check that on your tablet by selecting the currently connected WiFi network and checking advanced properties?

sequtan commented 3 years ago

I tried to turn Wi-Fi traffic limiting on and off and it worked. Thank you! It's a pity about this feature is not said anywhere. Another question: what does the pedestrian button on the map do?

zamojski commented 3 years ago

I will try to improve the description in preferences.

The pedestrian icon will be changed in next version but it enables or disables your current location tracking. Red icon means tracking is enabled. If you long press it it will show the description. If you scroll the map manually tracking will be disabled.