I will try to briefly imagine what I'm working on, and then present my question ... any help would be greatly appreciated!
I tried to connect the Android device to other phones in order to import phone book information via Bluetooth using the phone book access profile. To achieve this, I am trying to host my device as a PCE, while the other phone will act as a PSE.
I know that the role of PSE is already implemented on Android, so I'm studying its code and trying to somehow convert it to implement the other way.
So my problem is: when the server socket is created, it does not specify any UUID, it just starts listening on port 19, for example:
mServerSocket = mAdapter.listenUsingRfcommOn(PORT_NUM);
Wasn't it necessary to register for the PBAP service? How to make other devices discover the service and, more importantly, the UUID should be used when trying to connect to my PCE device using:
mSocket = mDevice.createRfcommSocketToServiceRecord(UUID_PBAP);
Thanks Pedro.
source
share