Why can't HTC Droid running OTA 2.1 communicate with RFCOMM?

心不动则不痛 提交于 2019-11-29 09:01:35

It's a waiting game. Until HTC finishes writing drivers to support RFCOMM on this device, RFComm won't work.

I have a HTC incredible Android 2.3.4. I've had similar issues that I've been able to work around using reflection.

So instead of using:

mBTSocket = mBTDevice.createRfcommSocketToServiceRecord(UUID_RFCOMM_GENERIC); 

Try using:

Method m = device.getClass().getMethod("createRfcommSocket", new Class[] {int.class});
mBTSocket = (BluetoothSocket) m.invoke(device, 1);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!