蓝牙、wifi 和铃声模式的广播意图
以下事件中广播的意图是什么,
- Wifi 状态更改、
- 蓝牙状态更改、
- 振铃模式更改
What are the intents that are broadcasted in the following events,
- Wifi state change
- Bluetooth state change
- Ringer mode change
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 Wifi 状态更改:
WifiManager.WIFI_STATE_CHANGED_ACTION ("android .net.wifi.WIFI_STATE_CHANGED”)
WifiManager.NETWORK_STATE_CHANGED_ACTION(“android.net.wifi.STATE_CHANGE”)
WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION(“android.net.wifi.supplicant.CONNECTION_CHANGE”)
另请查看 ConnectivityManager.CONNECTIVITY_ACTION ("android.net.conn.CONNECTIVITY_CHANGE")
对于蓝牙状态更改:
BluetoothAdapter.ACTION_STATE_CHANGED ("android.bluetooth .适配器.action.STATE_CHANGED”)
对于振铃模式更改:
AudioManager.RINGER_MODE_CHANGED_ACTION ("android.media.RINGER_MODE_CHANGED")
不是铃声模式更改,但这也可以很好地使用 AudioManager.VIBRATE_SETTING_CHANGED_ACTION ("android.media.VIBRATE_SETTING_CHANGED")
(哦,没有代表,所以只有 2 个链接...:( )
For Wifi state changes:
WifiManager.WIFI_STATE_CHANGED_ACTION ("android.net.wifi.WIFI_STATE_CHANGED")
WifiManager.NETWORK_STATE_CHANGED_ACTION ("android.net.wifi.STATE_CHANGE")
WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION ("android.net.wifi.supplicant.CONNECTION_CHANGE")
Also take a look at ConnectivityManager.CONNECTIVITY_ACTION ("android.net.conn.CONNECTIVITY_CHANGE")
For Bluetooth state changes:
BluetoothAdapter.ACTION_STATE_CHANGED ("android.bluetooth.adapter.action.STATE_CHANGED")
and for Ringer mode changes:
AudioManager.RINGER_MODE_CHANGED_ACTION ("android.media.RINGER_MODE_CHANGED")
Not a ringer mode change, but this can be good to have also AudioManager.VIBRATE_SETTING_CHANGED_ACTION ("android.media.VIBRATE_SETTING_CHANGED")
(Ops, got no rep so only 2 links... :( )