I am testing some actions (see below).
ConnectivityManager.CONNECTIVITY_ACTION
WifiManager.NETWORK_STATE_CHANGED_ACTION
PhoneStateListener.LISTEN_DATA_CONNECTION_STATE (it is not actually action)
PhoneStateListener.LISTEN_DATA_CONNECTION_STATE (it is not actually action)
But they only listen on the state (connected or disconnected).
When Wi-Fi is disabled, it can listen (enable mobile data → connected → broadcast → listener)
When wifi copnnnected, he can not listen (turn on mobile data → communication has not changed!)
I need mobile data settings for mobile devices or not
Can I listen to mobile data with the event turned on or off?
source
share