fosdem-companion-android icon indicating copy to clipboard operation
fosdem-companion-android copied to clipboard

Network Type may not be being verified in project

Open amazuerar opened this issue 2 years ago • 2 comments

Dear Developer!

My name is Alejandro Mazuera-Rozo, I am a PhD Student at Universidad de los Andes, and at Università della Svizzera italiana. I am part of a research on the usage of network libraries within android apps. As you might know, a device can have various types of network connections. For the full list of possible network types, see https://developer.android.com/reference/android/net/ConnectivityManager. Therefore it is recommended for the app to identify the type of network available before performing a network operation.

Note: Wi-Fi is typically faster. Also, mobile data is often metered, which can get expensive. A common strategy for apps is to only fetch large data if a Wi-Fi network is available.

In order to address this issue we recommend the following resources:

  1. https://developer.android.com/training/basics/network-ops/managing
  2. https://developer.android.com/training/efficient-downloads/connectivity_patterns
  3. https://developer.android.com/reference/android/net/NetworkCapabilities
  4. Applications should use NetworkCapabilities#hasTransport or requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback) to request an appropriate network.

amazuerar avatar Aug 14 '21 17:08 amazuerar

The app does not load large amounts of data so I don't think it makes sense to provide an option to only download large data on Wi-Fi.

cbeyls avatar Oct 01 '21 12:10 cbeyls

Also note that the app relies on the If-Modified-Since HTTP header to skip downloading the new schedule in case it didn't change and save bandwidth.

cbeyls avatar Oct 01 '21 12:10 cbeyls