|
@@ -1,29 +1,48 @@
|
|
# 微泰手表 -> AAPS
|
|
# 微泰手表 -> AAPS
|
|
*v1.0*
|
|
*v1.0*
|
|
|
|
|
|
-### 示例:
|
|
|
|
|
|
+## 示例:
|
|
|
|
|
|
```java
|
|
```java
|
|
Intent intent = new Intent();
|
|
Intent intent = new Intent();
|
|
intent.setAction(Action);
|
|
intent.setAction(Action);
|
|
intent.setClassName(PackageName,ClassName)
|
|
intent.setClassName(PackageName,ClassName)
|
|
-# 填充数据
|
|
|
|
|
|
+// 填充数据
|
|
|
|
+intent.putExtra("data",data)
|
|
Context.sendBroadcast(intent);
|
|
Context.sendBroadcast(intent);
|
|
```
|
|
```
|
|
|
|
|
|
-#### 参数 :
|
|
|
|
|
|
+`data:JSON 字符串`
|
|
|
|
|
|
- ACTION
|
|
- ACTION
|
|
- 类型:String 常量
|
|
- 类型:String 常量
|
|
- 区分大小写
|
|
- 区分大小写
|
|
- 值:com.microtechmd.cgm.EXTRA_BG
|
|
- 值:com.microtechmd.cgm.EXTRA_BG
|
|
|
|
|
|
-- PackageName
|
|
|
|
- - 类型:String 常量
|
|
|
|
- - 区分大小写
|
|
|
|
- - 值:info.nightscout.androidaps
|
|
|
|
|
|
|
|
-- ClassName
|
|
|
|
- - 类型:String 常量
|
|
|
|
- - 区分大小写
|
|
|
|
- - 值:info.nightscout.androidaps.receivers.DataReceiver
|
|
|
|
|
|
+### Data定义
|
|
|
|
+
|
|
|
|
+```Json
|
|
|
|
+{
|
|
|
|
+ "bg":103,
|
|
|
|
+ "time":1705906358752,
|
|
|
|
+ "trend":1,
|
|
|
|
+}
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+- time
|
|
|
|
+ - 类型:时间戳
|
|
|
|
+ - 描述:血糖的时间戳,单位毫秒。
|
|
|
|
+
|
|
|
|
+- bg
|
|
|
|
+ - 类型:浮点
|
|
|
|
+ - 描述:血糖值,单位mg/dl
|
|
|
|
+
|
|
|
|
+- trend
|
|
|
|
+ - 类型:整型
|
|
|
|
+ - 描述:血糖当前趋势(枚举值)
|
|
|
|
+ - 2:较快上升,箭头向上
|
|
|
|
+ - 1:缓慢上升,箭头斜向上
|
|
|
|
+ - 0:平稳,箭头平指
|
|
|
|
+ - -1:缓慢下降,箭头斜向下
|
|
|
|
+ - -2:较快下降,箭头向下
|