|
72 | 72 | **/
|
73 | 73 | ```
|
74 | 74 |
|
| 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 | + |
75 | 128 | ##Common模块
|
76 | 129 |
|
77 | 130 | * 页面堆栈管理ActivityPageManager
|
|
95 | 148 | * 封装LruCache,只缓存CACHE_SIZE大小的数量,超过CACHE_SIZE自动释放前面的对象,建议页面间传参使用。
|
96 | 149 |
|
97 | 150 |
|
98 |
| -##系统异常处理 |
| 151 | +##Exception系统异常处理 |
99 | 152 |
|
100 | 153 | * Bugtags是新一代的、专为移动测试而生的缺陷发现及管理工具。移动App集成Bugtags SDK后,测试人员就可以直接在App里所见即所得的提交 bug,SDK会自动截屏、收集App运行时数据,如:设备信息,控制台数据,用户的操作步骤等,团队人员在Bugtags云端高效的跟踪及管理bug。
|
101 | 154 |
|
102 | 155 |
|
103 |
| -##解析管理 |
| 156 | +##Parse解析管理 |
104 | 157 |
|
105 | 158 | * 支持XML、JSON、JSOAP解析
|
106 | 159 |
|
|
320 | 373 | refreshlistview.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
|
321 | 374 | ```
|
322 | 375 |
|
| 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 | + |
323 | 386 | ##教程
|
324 | 387 | * [优酷视频教程地址](http://v.youku.com/v_show/id_XMTQwNTU3NjI4NA==.html?qq-pf-to=pcqq.c2c),非常感谢[融云阿明](https://github.com/devinhu/SeaStar)的辛苦录制!
|
325 | 388 | * [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