Is ACTION_CONNECTION_STATE_CHANGED broadcasted on changes to Bluetooth RFCOMM / SPP connections?

Is ACTION_CONNECTION_STATE_CHANGED broadcasted on changes to RFCOMM / SPP connections?

Or is it only broadcast on changes to the 'other profiles' (A2DP etc.)

I'm trying to avoid having to manage the state of an RFCOMM connection if it's state is already being managed by the BluetoothAdapter

Also, not that I would resort to it but, has anyone attempted to use the @hidden BluetoothStateChangeCallback interface in BluetoothAdapter?

Answers


RFCOMM is not a bluetooth 'Profile' it is a protocol.

Serial Port Profile (SPP) is based on RFCOMM and is a profile. Though I am using

"the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB"

SPP doesn't seem to be an 'officially supported' profile, and thus ACTION_CONNECTION_STATE_CHANGED is not broadcast.

ACTION_ACL_CONNECTED, ACTION_ACL_DISCONNECTED, and ACTION_ACL_DISCONNECT_REQUESTED broadcast events of BluetoothDevice can be used to listen for the state of a bluetoothDevice.

These are low level events that will be broadcast for both the RFCOMM protocol and Profile connections.

I've found that these broadcasts don't necessarily behave in an expected manner though. As was also experienced here What triggers the BluetoothDevice.ACTION_ACL broadcasts?


Need Your Help

Not able to load an image in the webpage using mod_python

html mod-python

I have to make a webpage using mod_python, i have to load an image on the webpage this is the code that i have made

UIBarButtonItem for 4 tabs in a UITabBarController

ios uinavigationbar

I have a UITabBarController which contains 4 tabs. On each tab there should be an icon within the navigationbar which allows the user to open my settings view. I solved this by creating a parent cl...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.