nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.26k stars 1.77k forks source link

Ability to configure uploads on select SSIDs (or simplify metered connectivity) #821

Open ferdiga opened 7 years ago

ferdiga commented 7 years ago

Actual behaviour

-upload starts on active WIFI connection

Expected behaviour

-it should be possible to exclude certain URL's SSIDs like -- Hot Spots -- Internet services in airplanes (Emirates) -- other "expensive" (money, restricted bandwidth) services

Steps to reproduce

Environment data

Android version:

Device model:

Stock or customized system:

Nextcloud app version:

Nextcloud server version:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

tobiasKaminsky commented 7 years ago

We have a check if the wifi is unmetered, which is defined by android: https://developer.android.com/reference/android/net/NetworkCapabilities.html

In which metered wifi have you experienced this?

ferdiga commented 7 years ago

Emirates OnAIR

tobiasKaminsky commented 7 years ago

Strange, as far as I read this should be prevented. Maybe the wifi is not correctly recognized by android as a metered wifi. Do you have to login or see a captive login portal right after connecting to the wifi?

All in all, I doubt we can do much here as we have to rely on android wifi detection. cc @mario if he has another idea?

ferdiga commented 7 years ago

one has to login providing an email address and credit card info for the purchase of 500MB.

Emirates offers 10MB free and 500MB for 1USD.

how can I see if the wifi is metered ?

my remark of preventing certain URLS is obviously nonsense - it should prevent upload for certain SSID'S

tobiasKaminsky commented 7 years ago

how can I see if the wifi is metered ?

I do not think an user can see this as this is an internal state for android.

Maintaining a SSID blacklist is possible but much for work as each user has to "block" a wifi, whereas the approach with metered vs. unmetered should work out of the box.

AndyScherzinger commented 7 years ago

It is a user setting within Android. Simply go to: Settings - Data Usages - wifi tab - Network restrictions - mark the ssid as metered - you are done.

So imho nothing to do here since this would then be the ssid blacklist :)

ferdiga commented 7 years ago

Thank's for the advice. So I checked

But does anyone think that a "normal" user is able to find/set this? For example http://www.pcworld.com/article/3046538/android/6-ways-to-make-the-most-of-wi-fi-on-your-android-device.html http://www.pcworld.com/article/3026457/android/8-ways-to-tame-your-data-hogging-android-phone.html

mario commented 7 years ago

Android detects some of the Wifi's as metered anyway without you marking is as metered.

tobiasKaminsky commented 7 years ago

So what to do here? I think it is enough what we have, although it is quite complicated to find, but it is the android way of doing it. Bonus is that with this setting all apps will obey the wifi as metered and not only nc.

joshtrichards commented 2 weeks ago

Related: #270