createWarningNotification(
CoreService.getInstance().getRuntime().getContextProxy().context
.getString(R.string.body_temperature_exception_tips_text)
- + temperature.getBodyTemp() + "℃)", "body_temperature");
+ + temperature.getBodyTemp() + "℃)", "body_temperature",
+ Constants.WARNING_MSG_TYPE_BODY_TEMP);
} else if (resultCode == 3) {
//创建警告信息
createWarningNotification(
CoreService.getInstance().getRuntime().getContextProxy().context
.getString(R.string.out_temp_too_high_text)
- + temperature.getBodyTemp() + "℃)", "body_temperature");
+ + temperature.getBodyTemp() + "℃)", "body_temperature",
+ Constants.WARNING_MSG_TYPE_ENV_TEMP);
} else if (resultCode == 4) {
//创建警告信息
createWarningNotification(
CoreService.getInstance().getRuntime().getContextProxy().context
.getString(R.string.out_temp_too_low_text)
- + temperature.getBodyTemp() + "℃)", "body_temperature");
+ + temperature.getBodyTemp() + "℃)", "body_temperature",
+ Constants.WARNING_MSG_TYPE_ENV_TEMP);
}
}
}
- private void createWarningNotification(String title, String type) {
+ private void createWarningNotification(String title, String type, int contentType) {
ContentValues contentValues = new ContentValues();
//分类是心率的包名
contentValues.put(ICDatabaseHelper.notification_category, "com.ic.temperature");
ContentValues warningMsgValues = new ContentValues();
//设置数据
- warningMsgValues.put(ICDatabaseHelper.warning_msg_type, Constants.WARNING_MSG_TYPE_BODY_TEMP);
+ warningMsgValues.put(ICDatabaseHelper.warning_msg_type, contentType);
warningMsgValues.put(ICDatabaseHelper.warning_msg_title, title);
warningMsgValues.put(ICDatabaseHelper.warning_msg_has_read, 1);
warningMsgValues.put(ICDatabaseHelper.warning_msg_create_time, System.currentTimeMillis());