Skip to content

Commit ce2a392

Browse files
committed
Update README.md
1 parent 41b679a commit ce2a392

File tree

1 file changed

+65
-2
lines changed

1 file changed

+65
-2
lines changed

README.md

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,59 @@
7272
**/
7373
```
7474

75+
##BluetoothManager蓝牙处理模块
76+
77+
```javascript
78+
/**
79+
* [蓝牙管理类]
80+
*
81+
*/
82+
BluetoothManager bluetoothManager = BluetoothManager.getInstance(new BluetoothCallBack(){
83+
@Override
84+
public void onStateChange(int bluetoothState, String message) {
85+
switch(bluetoothState){
86+
//蓝牙不可用
87+
case BluetoothService.STATE_UNAVAILABLE:
88+
NToast.shortToast(mContext, "蓝牙不可用");
89+
break;
90+
91+
//蓝牙未连接
92+
case BluetoothService.STATE_NONE:
93+
NToast.shortToast(mContext, "蓝牙未连接");
94+
break;
95+
96+
//蓝牙空闲
97+
case BluetoothService.STATE_LISTEN:
98+
break;
99+
100+
//蓝牙正连接
101+
case BluetoothService.STATE_CONNECTING:
102+
NToast.shortToast(mContext, "蓝牙正连接");
103+
break;
104+
105+
//蓝牙已连接, 当如果连接上了,message就是蓝牙的名称
106+
case BluetoothService.STATE_CONNECTED:
107+
NToast.shortToast(mContext, "蓝牙已连接");
108+
mBluetoothState = true;
109+
break;
110+
}
111+
}
112+
113+
@Override
114+
public void onResult(int requsetCode, String data) {
115+
//回调结果在页面显示
116+
117+
}
118+
});
119+
120+
//发送蓝牙请求
121+
bluetoothManager.request(SEND_INL_CODE, charStr);
122+
123+
//断开
124+
bluetoothManager.stop();
125+
126+
```
127+
75128
##Common模块
76129

77130
* 页面堆栈管理ActivityPageManager
@@ -95,12 +148,12 @@
95148
* 封装LruCache,只缓存CACHE_SIZE大小的数量,超过CACHE_SIZE自动释放前面的对象,建议页面间传参使用。
96149

97150

98-
##系统异常处理
151+
##Exception系统异常处理
99152

100153
* Bugtags是新一代的、专为移动测试而生的缺陷发现及管理工具。移动App集成Bugtags SDK后,测试人员就可以直接在App里所见即所得的提交 bug,SDK会自动截屏、收集App运行时数据,如:设备信息,控制台数据,用户的操作步骤等,团队人员在Bugtags云端高效的跟踪及管理bug。
101154

102155

103-
##解析管理
156+
##Parse解析管理
104157

105158
* 支持XML、JSON、JSOAP解析
106159

@@ -320,6 +373,16 @@
320373
refreshlistview.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
321374
```
322375

376+
##日志
377+
378+
* assets文件夹下config.properties文件配置日志开关
379+
* NLog日志输出类
380+
```javascript
381+
#is debug mode, if debug is true that log is open, if debug is false that log is close.
382+
debug=true
383+
```
384+
385+
323386
##教程
324387
* [优酷视频教程地址](http://v.youku.com/v_show/id_XMTQwNTU3NjI4NA==.html?qq-pf-to=pcqq.c2c),非常感谢[融云阿明](https://github.com/devinhu/SeaStar)的辛苦录制!
325388
* [PPT手把手教程地址](https://github.com/devinhu/androidone/tree/master/androidOne%E5%BF%AB%E9%80%9F%E5%BC%80%E5%8F%91%E6%A1%86%E6%9E%B6ppt)

0 commit comments

Comments
 (0)