-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":973,"versionName":"2110151050","enabled":true,"outputFile":"ICSer_V973_2110151050_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V973_2110151050_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":977,"versionName":"2110151940","enabled":true,"outputFile":"ICSer_V977_2110151940_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V977_2110151940_release.apk","properties":{}}]
\ No newline at end of file
import android.net.Uri;
import android.os.Environment;
import android.os.SystemProperties;
+import android.os.UserHandle;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.telephony.TelephonyManager;
cmdMap.put(CMD_TYPE.BPDW, "BPDW");
cmdMap.put(CMD_TYPE.BPBJ, "BPBJ");
cmdMap.put(CMD_TYPE.BPTP, "BPTP");
+ cmdMap.put(CMD_TYPE.BPHT, "BPHT");
}
mConnection.DeliverCMDMessageToSystem("AP01", cmd);//通知下面线程服务器收到指令
break;
case BPHT:
+ handleBPHT(mConnection,cmd);
ICLogger.i("服务器收到上传的心率血压APHT");
mConnection.DeliverCMDMessageToSystem("APHT", cmd);//通知下面线程服务器收到指令
break;
}
}
+ public void handleBPHT(Connection connection, String cmd) {
+ //IWBPHT,870314001009713,98,35.6,63,118,78,-8
+ String[] cmdlist = cmd.split(CMDSPLIT);
+ if(cmdlist.length == 8){
+ sendTempBroadcast(Double.parseDouble(cmdlist[3]));
+ }
+ }
+
+ public static final String ACTION_TEMP_RESULT = "com.ic.action.watch_face_value";
+ public static final String KEY_TEMP_BODY = "body"; // double 体温
+
+ private void sendTempBroadcast(double bodyTemp) {
+ Intent pedIntent = new Intent();
+ ICLogger.i("bodyTemp == > " + bodyTemp);
+ pedIntent.setAction(ACTION_TEMP_RESULT);
+ pedIntent.putExtra(KEY_TEMP_BODY, bodyTemp);
+ mRuntime.getContextProxy().context.sendBroadcast(pedIntent);
+ }
public static StringMessage AP18(String index) {
return genStringMessage("AP18", new StringBuffer(CMDHEADER).append(cmdMap.get(CMD_TYPE.AP18))