android - Xamarin:Different between ConnectivityManager.ConnectivityAction and BluetoothAdapter.ACTION_STATE_CHANGED -
i wanted know different between connectivityaction , action_state_change.
at moment, having broadcastreceiver listen connectivityaction check wifi enable/disable state. in addition, used connectivityaction listen bluetooth enable/disable state.
in action_state_change, can same detect enable/disable bluetooth checking intent state_on.
the difference have between connectivityaction , action_state_change is: when register connectivityaction in onstart , unregister in onstop in activity, when user select enable/disable in setting screen, receiver still receive message. on other hand, if used action_state_change, if user select enable/disable in setting screen, broadcast receiver action_state_change won't receive message.
what different between 2 action filter.
connectivity_action - change in network connectivity has occurred.
action_state_change - broadcast action: state of local bluetooth adapter has been changed.
the first applies network change, second bluetooth adapter
Comments
Post a Comment