Android可以下载任何类型的日历事件吗?如果是,文件结构是什么? [英] Can Android download any type of calendar event? If so, what is the file structure?

查看:151
本文介绍了Android可以下载任何类型的日历事件吗?如果是,文件结构是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找年龄,试图确定Android设备可以下载并纳入系统日历的日历邀请/事件的格式 - 但是我无法找到任何内容!

I have been hunting for ages trying to determine what format of calendar invite/event an Android device can download and incorporate into the system calendar - however I have not been able to locate anything!

默认情况下,设备不支持i​​Cal或vCal,并且这两种格式的格式定义良好,易于创建。例如,这个PHP脚本适用于iPad或iPhone - 所以当您访问该页面时,设备会邀请您将其添加到您的日历中:

By default the device does not support iCal or vCal - and the formats for both of these are well defined and easy to create. For example, this PHP script works perfectly for an iPad or an iPhone - so when you visit the page, the device invites you to add it to your calendar:

<?
$ical = "BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:" . md5(uniqid(mt_rand(), true)) . "@yourhost.test
DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR";

header("Content-type: application/force-download");
header('Content-Disposition: attachment; filename=calendar.ics');
echo $ical;
exit;
?>

我正在尝试为Android创建类似的东西,但无法找到任何关于什么文件的指导

I'm trying to create something similar for Android, but am unable to find any guidance on what file it will happily download natively, without some third party apps!

任何想法或帮助赞赏!

谢谢,
Kaiesh

Thanks, Kaiesh

推荐答案

向圣地亚哥Rebella致敬:从Web .vcs下载将Android日历事件添加到Android

Kudos to Santiago Rebella: Add Calendar event to Android from web .vcs download

<?php
header("Content-Type: text/x-vCalendar");
header("Content-Disposition: attachment; filename=london2012.vcs");
?>

这篇关于Android可以下载任何类型的日历事件吗?如果是,文件结构是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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