Checking the network status. We are intrested in only in changes related with wifi connection.
It is necessary because there is only one type of event for all types of connection changes: android.net.conn.CONNECTIVITY_CHANGE