如何保存数据的应用程序到设备日历 [英] How to save data for app to device calendar
问题描述
我已经创建了包含某些日期选项的应用程序。
I have created an application which contains certain date option.
现在假设在某个日期我有写笔记我的应用程序。
Now suppose on some date I have write notes my app.
现在,当我preSS我的提交按钮,这些笔记保存在设备中的日历。
Now when I press my submit button, these notes are save in the device calendar.
那么,是不是可以节省您在您的应用程序在设备日历中直接使用基于您选择保存数据的日期数据?此外,当我从应用程序中删除我的数据,保存在设备日历中的数据也被删除。
So, is it possible to save the data that you used in your application directly in the device calendar based on the date you have selected for saving data? Moreover, when I delete my data from the app, the data saved in the device calendar is also deleted.
推荐答案
看看这个链接: HTTP://$c$c.google.com/apis/calendar/data/2.0/developers_guide.html
没有为API 2.0版本的Java库。尝试使用修改特定用户的谷歌日历。
There is a Java library for API version 2.0. Try using that to modify a particular user's Google Calendar.
您可以从这个问题找到当前用户的电子邮件ID(谷歌帐户)地址
You can find the current user's e-mail ID (Google account) from this question: Get owner's email address
更新:
下面是一个序列可能的工作:
Here is a sequence that might work:
- 认证 - 第一步就是让用户登录到自己的谷歌账户。链接: HTTP://$c$c.google.com/apis /accounts/docs/AuthForInstalledApps.html
- 列表日历 - 下,要求用户选择他想要使用的日历。请点击这里了解如何拿到日历列表:的http://$c$c.google.com/apis/calendar/data/2.0/developers_guide_java.html#RetrievingCalendars
- 添加事件 - 最后,将事件添加到选定的日历:http://$c$c.google.com/apis/calendar/data/2.0/developers_guide_java.html#CreatingSingle
- Authentication - The first step would be to have the user login into his Google account. Link: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
- List calendars - Next, ask the user to select which calendar he wants to use. Check here to see how to get list of calendars: http://code.google.com/apis/calendar/data/2.0/developers_guide_java.html#RetrievingCalendars
- Add Event - Finally, add the event to the selected calendar: http://code.google.com/apis/calendar/data/2.0/developers_guide_java.html#CreatingSingle
显然有可能是我错过了步骤。不要尝试这些了,阅读文档,看看是否需要在一些步骤
Obviously there might be steps I have missed. Do try these out and read the documentation to see if some steps are required in between
这篇关于如何保存数据的应用程序到设备日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!