问题描述
private class BluetoothReceiver extends broadcastReceiver {
@Override
public void onReceive(Context context,Intent intent) {
String action = intent.getAction();
switch (action) {
case BluetoothDevice.ACTION_FOUND:
showDevicesOnRv(intent);
break;
case BluetoothDevice.ACTION_BOND_STATE_CHANGED:
mDeviceAdapter.notifyDataSetChanged();
break;
case BluetoothAdapter.ACTION_disCOVERY_STARTED:
break;
case BluetoothAdapter.ACTION_disCOVERY_FINISHED:
stopScanDevice();
break;
}
}
}
showDevicesOnRv 方法
private void showDevicesOnRv(Intent intent) {
int RSSi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE);
Log.d("RSSi",RSSi+"----");..........}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)