-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":491,"versionName":"2008111430","enabled":true,"outputFile":"ICSer_V491_2008111430_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V491_2008111430_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":497,"versionName":"2008122043","enabled":true,"outputFile":"ICSer_V497_2008122043_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V497_2008122043_release.apk","properties":{}}]
\ No newline at end of file
needBroadcastAntiAlarm=true;\r
noPPGSensor=false;\r
noTempSensor=false;\r
- }else if ((custom_branch_name.equals("YQ")) ) { //A9-YQ\r
+ }else if (custom_branch_name.equals("YQ") ||custom_branch_name.equals("YQ_EN") ) { //A9-YQ\r
noPushTxtNotifyDialog=true;\r
noSMSNotifyDialog=true;\r
noVoiceNotifyDialog=true;\r
\r
public static String ACTION_ANTI_OFF = "com.ic.ACTION_STRIP";\r
public static String KEY_ANTI_EVENT="eventID"; //integer eventID =1 脱落, eventID =0 佩戴\r
-\r
+ public static String KEY_ANTI_TXT="eventTxt"; //String AnitMessage\r
\r
public static String ACTION_BATTERYLOW = "com.ic.ACTION_BATTERYLOW";\r
public static String KEY_BATTERY_EVENT="eventID"; //integer eventID =1 battery low, eventID =0 解除\r
\r
-\r
-\r
public static String PersistFotaServer2Url="persist.sys.ota.host2";\r
\r
/**\r
public static void DevliverStringMessage(String cmd,String str){\r
CoreService.getInstance().connection.DeliverCMDMessageToSystem(cmd,str);\r
}\r
+\r
+ public void checkAlarmMessage(){\r
+\r
+ if (runtime.Fence_Warning_flag>0){\r
+ runtime.Fence_Warning_flag++;\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context);\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_out_wall),2);\r
+ }\r
+ if(runtime.Anti_off_flag>0){\r
+ runtime.Anti_off_flag++;\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context);\r
+ if (runtime.getAntioffStatus()) {\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_Illegal_unlock), 2);\r
+ }else{\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_wristband_off), 2);\r
+ }\r
+ }\r
+\r
+ }\r
public void checkKeepSitting(){\r
String dateyyyyMMDDhhmmss=TimeUtil.getSystemTime3();\r
String sleepdate=TimeUtil.getCurrentSleepRecordDate(dateyyyyMMDDhhmmss);\r
locationClient.updateStepCount();\r
updateSleepDate(); //检查睡眠\r
checkKeepSitting();//检查久坐\r
+ checkAlarmMessage();//检测是否有报警消息需要显示\r
if (this.mKeepAlive != null) {\r
if (connection.isServerConnected() && runtime.isServerProtocolConnected()) {\r
this.mKeepAlive.onHeartAlarm(this.connection, this.runtime);\r
return alarmType;\r
}\r
\r
+ //0 代表没有出围栏,如果出围栏则置1,每次报警再加1\r
+ public int Fence_Warning_flag=0;\r
+\r
+ //0 代表佩戴,如果脱腕则置1,每次报警再加1\r
+ public int Anti_off_flag=0;\r
+\r
public enum AlarmType{\r
ALARM_SOS,\r
ALARM_LOWBATTERY,\r
\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.R;\r
import com.enqualcomm.support.bean.Runtime;\r
import com.enqualcomm.support.service.base.AbstractInvokeHandlerService;\r
import com.enqualcomm.support.utils.Connection;\r
\r
import static com.enqualcomm.support.Constants.ACTION_ANTI_OFF;\r
import static com.enqualcomm.support.Constants.KEY_ANTI_EVENT;\r
+import static com.enqualcomm.support.Constants.KEY_ANTI_TXT;\r
+import static java.lang.Thread.interrupted;\r
import static java.lang.Thread.sleep;\r
\r
\r
// play_notify();\r
send_anti_event_broadcast(0);\r
}\r
+ mRuntime.Anti_off_flag=0;\r
mRuntime.setAlarmType(Runtime.AlarmType.ALARM_WEARED);\r
String msg=protocolAPIHelper.getWarningMSG(mRuntime);\r
Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
+\r
// try {\r
// sleep(1000);\r
// } catch (InterruptedException e) {\r
}//delay一会儿再发消息,以屏没有来得急亮起,免界面不响应。\r
send_anti_event_broadcast(1);\r
}\r
+ mRuntime.Anti_off_flag=1;\r
mRuntime.setAlarmType(Runtime.AlarmType.ALARM_ANTIOFF);\r
String msg=protocolAPIHelper.getWarningMSG(mRuntime);\r
Deliver.sendLocationMSG(msg); //消息很重要,所以利用带buffer的对列来发送!\r
Intent intent=new Intent();\r
intent.setAction(ACTION_ANTI_OFF);\r
intent.putExtra(KEY_ANTI_EVENT,antioff);\r
- mContext.sendBroadcast(intent);\r
+ if (antioff==0) {\r
+ intent.putExtra(KEY_ANTI_TXT, "");\r
+ mContext.sendBroadcast(intent);\r
+ mRuntime.getContextProxy().sendMsgBroadcast(mContext.getResources().getString(R.string.alarm_wristband_on),0); //佩戴\r
+ }else{\r
+ if (mRuntime.getAntioffStatus()==true){\r
+ intent.putExtra(KEY_ANTI_TXT, mContext.getResources().getString(R.string.alarm_Illegal_unlock));\r
+ }else {\r
+ intent.putExtra(KEY_ANTI_TXT, mContext.getResources().getString(R.string.alarm_wristband_off));\r
+ }\r
+ mContext.sendBroadcast(intent);\r
+ }\r
+\r
\r
}\r
\r
}\r
public static void sendMsgBroadcast(Context _context,String msg, int msgType) {\r
\r
- if (msgType==0){\r
+ if (msgType==0) {\r
Observable.timer(50L, TimeUnit.MILLISECONDS).subscribe(new Action1<Long>() {\r
public void call(Long param1Long) {\r
- if(Config.noPushTxtNotifyDialog==false) {\r
+ if (Config.noPushTxtNotifyDialog == false) {\r
Intent intent = new Intent();\r
intent.setAction(DIALOG_ACTION);\r
intent.putExtra("pushtxt", msg);\r
_context.sendBroadcast(intent);\r
- }else{\r
+ } else {\r
WakeLockUtil.ScreenOnWakeLockTemperary(_context);\r
play_waning_notify(_context);\r
VibrateUtil.getInstance(_context).VibrateOnOnce(true);\r
}\r
}\r
Intent intent = new Intent("action.ic.srvPushTxt");\r
- intent.putExtra("msgType", 0); //0 代表 server下发消息,1代表 SMS消息\r
+ intent.putExtra("msgType", msgType); //0 代表 server下发消息,1代表 SMS消息\r
intent.putExtra("txtMsg", msg);\r
intent.addFlags(FLAG_ACTIVITY_NEW_TASK);\r
_context.sendBroadcast(intent);\r
}\r
});\r
+ }else if (msgType==2){\r
+ Observable.timer(50L, TimeUnit.MILLISECONDS).subscribe(new Action1<Long>() {\r
+ public void call(Long param1Long) {\r
+ if (Config.noPushTxtNotifyDialog == false) {\r
+ Intent intent = new Intent();\r
+ intent.setAction(DIALOG_ACTION);\r
+ intent.putExtra("pushtxt", msg);\r
+ _context.sendBroadcast(intent);\r
+ } else {\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(_context);\r
+ play_waning_notify(_context);\r
+ VibrateUtil.getInstance(_context).VibrateOnOnce(true);\r
+ try {\r
+ Thread.sleep(2000);\r
+ } catch (InterruptedException e) {\r
+ e.printStackTrace();\r
+ }\r
+ }\r
+ Intent intent = new Intent("action.ic.srvPushTxt");\r
+ intent.putExtra("msgType", msgType); //0 代表 server下发消息,1代表 SMS消息,2代表有提示音的消息\r
+ intent.putExtra("txtMsg", msg);\r
+ intent.addFlags(FLAG_ACTIVITY_NEW_TASK);\r
+ _context.sendBroadcast(intent);\r
+ }\r
+ });\r
+\r
}else{\r
Observable.timer(50L, TimeUnit.MILLISECONDS).subscribe(new Action1<Long>() {\r
public void call(Long param1Long) {\r
}\r
\r
Intent intent = new Intent("action.ic.srvPushTxt");\r
- intent.putExtra("msgType", 1); //0 代表 server下发消息,1代表 SMS消息\r
+ intent.putExtra("msgType", msgType); //0 代表 server下发消息,1代表 SMS消息,2代表有提示音的消息\r
intent.putExtra("txtMsg", msg);\r
intent.addFlags(FLAG_ACTIVITY_NEW_TASK);\r
_context.sendBroadcast(intent);\r
\r
import com.enqualcomm.support.Config;\r
import com.enqualcomm.support.CoreService;\r
+import com.enqualcomm.support.R;\r
import com.enqualcomm.support.bean.Alarm;\r
import com.enqualcomm.support.bean.Contact;\r
import com.enqualcomm.support.bean.Content;\r
import com.enqualcomm.support.utils.TemperatureUtil;\r
import com.enqualcomm.support.utils.TimeUtil;\r
import com.enqualcomm.support.utils.Util;\r
+import com.enqualcomm.support.utils.WakeLockUtil;\r
\r
import java.io.File;\r
import java.util.ArrayList;\r
String type=list[3];\r
connection.send(genStringMessage("AP86",AP68(index)));\r
ICLogger.i("收到服务器消息:"+(type.equals("1")?"绑定成功 ":"未激活或者解绑"));\r
+ if (Config.custom_branch_name.equals("YQ")||Config.custom_branch_name.equals("YQ_EN")) {//AK-YQ\r
+ if (type.equals("1")) {\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context);\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_lock_success), 2);\r
+ runtime.setAntioffStatus(true);\r
+ } else {\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context);\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_unbind_success), 2);\r
+ runtime.setAntioffStatus(false);\r
+ //1 分钟后重置\r
+ Observable.timer(60L, TimeUnit.SECONDS).subscribe(new Action1<Long>() {\r
+ public void call(Long param1Long) {\r
+ Util.doMasterClear(runtime.getContextProxy().context);\r
+ }\r
+ });\r
+ }\r
+ }\r
\r
}else{\r
ICLogger.i("BP86 format error!");\r
connection.send(genStringMessage("APDE",APDE(index)));\r
if ( Integer.parseInt(msg) == 1) {\r
ICLogger.i("Handle BPDE index " + index + ", 进入禁止区域 ");\r
+ runtime.Fence_Warning_flag=1;\r
+ WakeLockUtil.ScreenOnWakeLockTemperary(runtime.getContextProxy().context);\r
+ runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_out_wall),2);\r
}else {\r
ICLogger.i("Handle BPDE index " + index + ", 离开禁止区域 ");\r
+ runtime.Fence_Warning_flag=0;\r
+// runtime.getContextProxy().sendMsgBroadcast(runtime.getContextProxy().context.getResources().getString(R.string.alarm_out_wall),0);\r
}\r
}else{\r
ICLogger.i("BPDE format error!");\r
-#Tue Aug 11 14:30:49 CST 2020\r
-VERSION_CODE=491\r
+#Wed Aug 12 20:43:40 CST 2020\r
+VERSION_CODE=497\r
# Location of the SDK. This is only used by Gradle.\r
# For customization when using a Version Control System, please read the\r
# header note.\r
-#Wed Aug 05 23:43:00 CST 2020\r
-sdk.dir=D\:\\Android\\Sdk\r
+#Wed Aug 12 10:23:43 CST 2020\r
+sdk.dir=C\:\\Users\\incar\\AppData\\Local\\Android\\Sdk\r