|
@@ -0,0 +1,41 @@
|
|
|
+# AAPS join Sino
|
|
|
+*v1.0*
|
|
|
+
|
|
|
+| 时间 | 内容 | 版本 | 修订人 |
|
|
|
+| --------- | ---- | ---- | ------ |
|
|
|
+| 2024-1-23 | 创建 | 1.0 | kot |
|
|
|
+
|
|
|
+## Aidex Send AAPS 示例:
|
|
|
+
|
|
|
+```java
|
|
|
+Intent intent = new Intent();
|
|
|
+intent.setAction(Action);
|
|
|
+// 填充数据
|
|
|
+Context.sendBroadcast(intent);
|
|
|
+```
|
|
|
+
|
|
|
+- ACTION
|
|
|
+ - 类型:String 常量
|
|
|
+ - 区分大小写
|
|
|
+ - 值:com.sino.cgm.EXTRA_BG
|
|
|
+<br/>
|
|
|
+
|
|
|
+## AAPS Receiver Sino 示例:
|
|
|
+
|
|
|
+```java
|
|
|
+private BroadcastReceiver receiver = new BroadcastReceiver() {
|
|
|
+ @Override
|
|
|
+ public void onReceive(context: Context, intent: Intent) {
|
|
|
+
|
|
|
+ //do samething
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// 订阅
|
|
|
+IntentFilter filter=new IntentFile();
|
|
|
+filter.addAction("com.sino.cgm.EXTRA_BG");
|
|
|
+context.registerReceiver(receiver,filter);
|
|
|
+
|
|
|
+// 取消订阅
|
|
|
+context.unregisterReceiver(receiver);
|
|
|
+```
|