可以参考SDK/SAMPLES里的BluetoothChat,这是一个蓝牙聊天室
解决方案 »
- android硬件加速后闪屏怎么办?急啊。
- 如何在程序里使用在com.android.phone实现的类?
- 关于android开发列表添加信息的问题
- listview 选中一个checkbox为什么会自动选中多个checkbox
- 如何把GUID放入一个16位的二进制上。又如何读取一个16位的二进制回GUID
- 9PNG用的很不舒服,请高手指导!
- android 4.0以上的版本 怎样读写外置sd卡?
- 这段代码加了try catch,有没有意义?
- 新人刚刚接触android 虚拟机的配置问题。。
- xutils数据入库慢
- android学习讨论.
- Android平台下有什么好点的手机地图软件推荐啊?
我看了,没有配对,我想把ANDROID系统里的Setting 的蓝牙设置移植,没移填成功..
请教怎样移植?
用一些android sdk2.1做一些应用开发, 并没有自己烧系统那种,怎样移植?有资料吗?
在API里面居然没有,也不能使用.. /**
* Start the bonding (pairing) process with the remote device.
* <p>This is an asynchronous call, it will return immediately. Register
* for {@link #ACTION_BOND_STATE_CHANGED} intents to be notified when
* the bonding process completes, and its result.
* <p>Android system services will handle the necessary user interactions
* to confirm and complete the bonding process.
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
*
* @return false on immediate error, true if bonding will begin
* @hide
*/
public boolean createBond() {
try {
return sService.createBond(mAddress);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
}
哦,忘了说,其他设备是建立了一个服务监听器,并在开启服务前设置设备可被搜索(Enabling discoverability),其他设备搜索到此设备后,直接以client的方式connect到此设备
不会啊,我用sdk 2.1下的BluetoothChat安装到真机上可以用啊(模拟器上模拟不了蓝牙,需要真机才能用)