Good day. It is necessary to activate the message when the Internet is disconnected. Trying to understand this topic, I am even more confused. As I understand it, you need to create a receiver of broadcast messages (create a class that inherits BroadcastReceiver ), then in activit register this receiver of broadcast messages. But then there are two questions:
- Suppose a message is sent that the Internet is gone, respectively, the
onReceivemethodonReceive, but doesn’t the activation know something about it? How to transfer this information accordingly? - How to implement the sending of messages for the receiver about changing the status of the Internet (found on the Internet that you need to use the
ConnectivityManager)?