android – 什么是CalendarContract.EventsColumns.CUSTOM_APP_URI?

android – 什么是CalendarContract.EventsColumns.CUSTOM_APP_URI?,第1张

概述标题说明了一切:CalendarContract.EventsColumns.CUSTOM_APP_URI是什么? 我问,因为我正在寻找一个我的应用程序可以将一些特定于应用程序的数据填充到Events表中的地方.也许这是一个徒劳的问题,因为当然,我需要确保其他一些应用程序不会丢弃我的数据. 也许更好的问题是:如何在日历事件表中存储特定于应用程序的数据? 正如CalendarContract中的一样 标题说明了一切:CalendarContract.EventsColumns.CUSTOM_APP_URI是什么?

我问,因为我正在寻找一个我的应用程序可以将一些特定于应用程序的数据填充到Events表中的地方.也许这是一个徒劳的问题,因为当然,我需要确保其他一些应用程序不会丢弃我的数据.

也许更好的问题是:如何在日历事件表中存储特定于应用程序的数据?

解决方法 正如CalendarContract中的一样:

/** * Activity Action: display the event to the user in the custom app as * specifIEd in {@link EventsColumns#CUSTOM_APP_PACKAGE}. The custom app * will be started via {@link Activity#startActivityForResult(Intent,int)} * and it should call {@link Activity#setResult(int)} with * {@link Activity#RESulT_OK} or {@link Activity#RESulT_CANCELED} to * ackNowledge whether the action was handled or not. * * The custom app should have an intent-filter like the following * <pre> * {@code * <intent-filter> *    <action androID:name="androID.provIDer.calendar.action.HANDLE_CUSTOM_EVENT" /> *    <category androID:name="androID.intent.category.DEFAulT" /> *    <data androID:mimeType="vnd.androID.cursor.item/event" /> * </intent-filter> * } * </pre> * <p> * input: {@link Intent#getData} has the event URI. The extra * {@link #EXTRA_EVENT_BEGIN_TIME} has the start time of the instance. The * extra {@link #EXTRA_CUSTOM_APP_URI} will have the * {@link EventsColumns#CUSTOM_APP_URI}. * <p> * Output: {@link Activity#RESulT_OK} if this was handled; otherwise * {@link Activity#RESulT_CANCELED} */

// @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)    public static final String ACTION_HANDLE_CUSTOM_EVENT =        “androID.provIDer.calendar.action.HANDLE_CUSTOM_EVENT”;

总结

以上是内存溢出为你收集整理的android – 什么是CalendarContract.EventsColumns.CUSTOM_APP_URI?全部内容,希望文章能够帮你解决android – 什么是CalendarContract.EventsColumns.CUSTOM_APP_URI?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1126848.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存