开发者

Broadcast receiver for (any) active network

开发者 https://www.devze.com 2023-04-04 05:13 出处:网络
Time has come to learn how to imple开发者_运维百科ment a broadcast receiver for the first time. :)

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消