资源简介
android 蓝牙助手 源代码
代码片段和文件信息
/*
* The MIT License (MIT)
* Copyright (c) 2015 linkMob.cc
* Author: lujun
* Permission is hereby granted free of charge to any person obtaining a copy
* of this software and associated documentation files (the “Software“) to deal
* in the Software without restriction including without limitation the rights
* to use copy modify merge publish distribute sublicense and/or sell
* copies of the Software and to permit persons to whom the Software is
* furnished to do so subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
* IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
* LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package co.lujun.lmbluetoothsdk;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.content.Intent;
import java.util.Set;
import java.util.UUID;
import co.lujun.lmbluetoothsdk.base.Bluetooth;
import co.lujun.lmbluetoothsdk.base.BluetoothListener;
import co.lujun.lmbluetoothsdk.base.State;
import co.lujun.lmbluetoothsdk.service.BluetoothService;
/**
* Author: lujun(http://blog.lujun.co)
* Date: 2016-1-14 10:59
*/
public class BluetoothController extends Bluetooth {
private BluetoothService mBluetoothService;
private static BluetoothController sBluetoothController;
/**
* Get current instance as singleton.
* @return BluetoothController instance
*/
public static BluetoothController getInstance(){
if (sBluetoothController == null){
synchronized (BluetoothController.class){
if (sBluetoothController == null){
sBluetoothController = new BluetoothController();
}
}
}
return sBluetoothController;
}
/**
* Build this instance.
* @param context the current context you use
* @return BluetoothController instance
*/
public BluetoothController build(Context context){
mContext = context;
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
mBluetoothService = new BluetoothService();
return this;
}
/**
* Set bluetooth listener you can check all bluetooth status and read data with this listener‘s callback.
* @param listener a BluetoothListener
*/
public void setBluetoothListener(BluetoothListener listener){
this.mBluetoothListener = listener;
registerReceiver();
if (mBluetoothService != null) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\
文件 511 2017-02-16 13:58 LMBluetoothSdk-master\.gitignore
文件 684 2017-02-16 13:58 LMBluetoothSdk-master\.travis.yml
文件 9556 2017-02-16 13:58 LMBluetoothSdk-master\README.md
文件 644 2017-02-16 13:58 LMBluetoothSdk-master\build.gradle
文件 855 2017-02-16 13:58 LMBluetoothSdk-master\gradle.properties
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\gradle\
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\gradle\wrapper\
文件 53637 2017-02-16 13:58 LMBluetoothSdk-master\gradle\wrapper\gradle-wrapper.jar
文件 233 2017-02-16 13:58 LMBluetoothSdk-master\gradle\wrapper\gradle-wrapper.properties
文件 4971 2017-02-16 13:58 LMBluetoothSdk-master\gradlew
文件 2314 2017-02-16 13:58 LMBluetoothSdk-master\gradlew.bat
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\
文件 511 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\.gitignore
文件 559 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\build.gradle
文件 685 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\proguard-rules.pro
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\
文件 336 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\AndroidManifest.xm
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\
文件 6370 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\BluetoothController.java
文件 10355 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\BluetoothLEController.java
目录 0 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
文件 3026 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
文件 7282 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
文件 2451 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
文件 1588 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
文件 1900 2017-02-16 13:58 LMBluetoothSdk-master\lmbluetoothsdk\src\main\java\co\lujun\lmbluetoothsdk\ba
............此处省略69个文件信息
相关资源
- JAVA版坦克大战源码(源代码,eclips
- android开源天气预报app - 清新小天气
- Android Studio从入门到精通 完整中文版
- 《android多媒体开发技术实战详解》(
- Android 通过JNI实现双守护进程,保证服
- Android 邮箱源码
- 《Java编程手记——从实践中学习Jav
- android开发的2048小游戏
- android中TextView高亮并可以点击
- AndroidStudio UDP测试程序
- 基于java的图像处理源代码
- 基于Android平台的ViBe前景检测
- 论文-基于Android系统的酒店点餐系统的
- 学生信息管理系统项目源码Android应用
- Unity5Google Protobuf解析工具,支持andr
- android使用nanohttpd2.3.1搭建httpserver实现
- 仿QQ音乐播放器源代码
- 基于Android的本地视频播放器
- jsp实战项目源代码-学生成绩管理系统
- 认识Android入门的HelloWorld程序
- Android开发环境搭建流程
- Android课程设计源码仿QQ音乐播放器安
- Android美团加载提示动画效果
- android-短信验证码截取自动填入源码
- Android 下拉activity并跳转一个新的act
- Android 连接 SQL数据库
- Android WelcomeActivity 启动画更换网络图
- 自我感觉完美的“Android客户端+PHP服务
- Android - \“失物招领平台\“的功能设
- android-gif-drawable最快最流畅GIF
评论
共有 条评论