Time has come to learn how to imple开发者_运维百科ment a broadcast receiver for the first time. :)
I found this great example for a WiFi Scan broadcast receiver, but that's too WiFi detail oriented. All I need is a Boolean notification that tells me whether any active network has been found.
Is there a particular such broadcast?
Is there a compilation/list of all system generated broadcasts?
See this and this
In case the pages pointed by the links ever goes down, here is the key:
register a BroadcastReciver with action ConnectivityManager.CONNECTIVITY_ACTION.
精彩评论