如何使用java以编程方式为google日历设置自定义通知

xoefb8l8  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(245)
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中传递通知参数?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题