String eventDescription = StringUtils.isNotBlank(description) ? description : StringUtils.EMPTY;
String eventTitle = StringUtils.isNotBlank(title) ? title : StringUtils.EMPTY;
String eventStartDate = "";
String eventEndDate = "";
String visibility = "AVAILABLE";
String dateFormat = ArticleConstants.GLOBAL_DATE_FORMAT;
if (null != startDate) {
// used DateUtils class of apache.commons.lang to add 5 minutes in start date.
Date endDate = DateUtils.addMinutes(startDate, 5);
eventStartDate = getGMTDateFormat(startDate, dateFormat);
eventEndDate = getGMTDateFormat(endDate, dateFormat);
}
if (eventStartDate != null && eventEndDate != null) {
try {
URIBuilder uri = new URIBuilder(ArticleConstants.GOOGLE_CALENDAR_ENDPOINT);
uri.addParameter("action", "TEMPLATE");
uri.addParameter("dates", eventStartDate + HQConstants.FORWARD_SLASH + eventEndDate);
uri.addParameter("text", eventTitle);
uri.addParameter("details", eventDescription);
uri.addParameter("crm", visibility);
return uri.build().toString();
}
我想为谷歌日历添加自定义通知,默认为10分钟。我希望它是0分钟。在传递其他字段(如标题、详细信息、可见性)时,如何在url中传递通知参数?
暂无答案!
目前还没有任何答案,快来回答吧!