Android的Google日历API和日历提供程序API [英] Android Calendar API vs Calendar Provider API

查看:347
本文介绍了Android的Google日历API和日历提供程序API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对两者之间的区别有点困惑。日历API的例子推测位于:<一href=\"http://samples.google-api-java-client.google$c$c.com/hg/calendar-android-sample/instructions.html\">http://samples.google-api-java-client.google$c$c.com/hg/calendar-android-sample/instructions.html,但笔者本人建议使用日历提供程序API,有关细节在这里的:<一href=\"http://developer.android.com/guide/topics/providers/calendar-provider.html\">http://developer.android.com/guide/topics/providers/calendar-provider.html.

I'm a little bit confused about the difference between the two. An example of the Calendar API is supposedly located here: http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html, but the author himself suggests using the Calendar Provider API, details about which are here: http://developer.android.com/guide/topics/providers/calendar-provider.html.

有人能向我解释了两者之间的区别,并会更好,我用一个简单的日历应用程序?

Can someone explain to me the difference between the two, and which would be better for me to use for a simple calendar app?

推荐答案

我没有经过太多的谷歌API code的走了,但我认为,如果你使用谷歌的API,你将不得不处理的网络同步日历,但由于同步已经被Android的Google日历提供商完成的,您可以通过使用查询,插入使用日历提供商,delete语句,而不是学习谷歌的API规范。

I have not gone through much of the google api code, but i think if you use google api, you will have to handle network syncing of the calendar, but Since syncing is already done by android calendar provider, You can use calendar provider by using query, insert, delete statements instead of learning the google api specification.

另外我想使用谷歌API code,你将不得不处理OAuth认证。未在日历提供商的情况下,需要

Further i guess using google api code, you will have to handle oauth authentication. Which is not required in case of calendar provider

所以,供应商应该更容易。

So Provider should be easier.

这篇关于Android的Google日历API和日历提供程序API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆