I am developing an android broadcast receiver for checking internet connection.
The problem is that my broadcast receiver is being called two times. I want it to get
CONNECTIVITY_ACTION docs:
Apps targeting Android 7.0 (API level 24) and higher do not receive this broadcast if they declare the broadcast receiver in their manifest. Apps will still receive broadcasts if they register their BroadcastReceiver with Context.registerReceiver() and that context is still valid.