Internet availability may not be being verified in methods
Dear Developer!
My name is Camilo Escobar, I am a PhD Student at Universidad de los Andes, Colombia. I am part of a research on the usage of network libraries within android apps. As a result of this we have identified some code locations that might have a missing validation of Internet availability, validation that is needed since some network operations are being performed within some methods.
As you might know, a device may be connected to a network but may not have Internet connection. Therefore it is recommended for the app to identify whether the device is connected to a network having Internet connectivity before performing a network operation.
In order to address this issue we recommend you to visit:
- https://developer.android.com/reference/android/net/NetworkCapabilities
- https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_INTERNET
- https://developer.android.com/reference/android/net/NetworkCapabilities#NET_CAPABILITY_VALIDATED
Potential Code Location missing Internet connectivity validation:
https://github.com/simlar/simlar-android/blob/6af259d2c9c52dba69f508878679e21c77c484d4/app/src/main/java/org/simlar/https/HttpsPost.java#L79-L85