简体   繁体   English

提取ICS Android日历作为独立应用程序

[英]Extracting ICS Android Calendar as Stand Alone App

I have been asked to blend our company specific events into the existing Android calendar. 我被要求将我们公司的特定活动混入现有的Android日历中。 Our events have four fields I don't find with the standard CalendarContract.Events class. 我们的事件有四个字段,它们是标准CalendarContract.Events类找不到的。 A boolean "approved" field, an integer "linked" to a resource, and two dateTime fields indicating. 一个布尔值“ approved”字段,一个“链接”到资源的整数和两个dateTime字段指示。

The first step seems to be to extract the existing ICS calendar into a compileable stand alone application. 第一步似乎是将现有的ICS日历提取到可编译的独立应用程序中。 I have downloaded the android.calendar package from github, but it won't compile in Eclipse. 我已经从github下载了android.calendar包,但是不会在Eclipse中编译。 It appears to be missing certain imports: com.android.common, com.android.commoncalendar, and com.android.ex. 它似乎缺少某些导入:com.android.common,com.android.commoncalendar和com.android.ex。

I have searched stackOverflow for help extracting a stand-alone version of android standard apps, but have mostly seen people respond that it is not possible. 我搜索了stackOverflow以帮助提取独立版本的android标准应用程序,但大多数人看到人们回答说这是不可能的。 I know it is possible because it has been done. 我知道这是可能的,因为它已经完成了。 You can find it here: 你可以在这里找到它:

https://play.google.com/store/apps/details?id=com.concentriclivers.calendar https://play.google.com/store/apps/details?id=com.concentriclivers.calendar

I have emailed the developer to see if he would share his source code or at least describe the steps he took to get the package to compile as a stand alone application, but he has not responded. 我已通过电子邮件发送给开发人员,以查看他是否将共享他的源代码,或者至少描述他为使软件包作为独立应用程序进行编译而采取的步骤,但是他没有回应。

Can anyone help me with how to fix the missing imports, or better yet point me to a resource that describes step-by-step how I do this? 谁能帮助我修复丢失的进口,或者更好地为我提供一个逐步说明如何执行此操作的资源?

Thanks! 谢谢!

I wouldn't be in any kind of hurry to rebuild one of the standard apps. 我不会急着重建一个标准的应用程序。 That sounds like a recipe for pain. 这听起来像是痛苦的秘方。 Instead, I suggest you make use of the Calendar content provider that is already present, and create another set of tables that indexes by the Calendar CP but adds the rows you are missing. 相反,我建议您使用已经存在的Calendar内容提供程序,并创建另一组表,这些表由Calendar CP进行索引,但是添加您缺少的行。 You could then make a custom cursor that blends these two sources together, or maybe make another content provider to wrap them and keep the cursor simple. 然后,您可以创建一个自定义光标,将这两个源混合在一起,或者让另一个内容提供者包装它们并使光标保持简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM