Apps have the capability to instant identify the network state and chance their behavior accordingly. Here we are going to implement a short piece of code that makes the APP to identify what is its current connectivity state, if it is with Wi-fi, Mobile Data/Nework (5G) or even if the user has turned the airplane mode on.
Enjoy!
0:00 What is mobile (smartphone) connectivity?
1:24 Android explanation: hasWifi, hasMobileNetwork, isAirplaneModeOn
4:08 Show app running, handling different kinds of connectivities.