Android Bluetooth开发总结-----/*自己编写*/
来源:互联网 发布:淘宝套现信用卡手续费 编辑:程序博客网 时间:2024/06/10 07:51
1. 开启手机的蓝牙适配器
// 当地的蓝牙适配器private BluetoothAdapter mBluetoothAdapter = null;// 得到当地的蓝牙适配器mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();// 手机蓝牙适配器获取错误,弹出提示窗口if (mBluetoothAdapter == null) {<span style="white-space:pre"></span>Toast.makeText(this, "can't find bluetooth adapter", Toast.LENGTH_LONG).show();finish();return;}//手机蓝牙功能如果没开选择开启if (!mBluetoothAdapter.isEnabled()) {mBluetoothAdapter.enable(); // 系统会弹出选择开启蓝牙的提示框}
2.
0 0
- Android Bluetooth开发总结-----/*自己编写*/
- Android学习之Bluetooth开发总结
- Android学习之Bluetooth开发总结
- Android学习之Bluetooth开发总结
- # Android Bluetooth(蓝牙)开发总结
- Android Bluetooth 总结
- Android Bluetooth 总结
- Android Bluetooth 总结
- Android Bluetooth 总结
- Android Bluetooth 总结
- android bluetooth开发
- Android Bluetooth开发
- BlueTooth Android开发基础
- Android bluetooth 开发
- android 开发之 Bluetooth
- Android bluetooth开发
- Android BlueTooth开发
- Android Bluetooth开发1
- Centos 7.2 配置防火墙
- HashMap的实现原理
- 杨辉三角(利用二维数组)
- 习题20 函数和文件
- Xcode7 编译出错---does not contain bitcode
- Android Bluetooth开发总结-----/*自己编写*/
- ftl判断是否相等,判断是否为空,得到list长度的问题、截取字符串长度
- 【工具技巧】——EA生成架构
- 为什么使用单例模式
- getRequestURI,getRequestURL的区别
- Makefile中用宏定义进行条件编译
- day_14-acm 对拍
- java学习之路 之 基本语法-特殊的流程控制语句(break、continue、return)
- 应用层协议