Dynamic BroadcastReceiver to Check Online Connectivity
问题 I want to dynamically set up a BroadcastReceiver to check whether or not I am online ONLY when my app is running in the foreground. Within my main class, I created an an Intent Filter, a nested BroadcastReceiver Class and finally register/unregister the receiver within the onResume and onPause methods respectively. My question is, is there an an intent ACTION that I can add to my intent filter that checks for online connectivity? If not, how can I create this Dynamic Broadcast Receiver to