我一直在追捕年龄试图确定什么格式的日历邀请/事件在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!
默认情况下,设备不支持iCal或的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的东西,但我找不到什么文件时,它会高兴地下载本机的任何指导,没有一些第三方的应用!
任何意见或帮助AP preciated!
Any ideas or help appreciated!
谢谢, Kaiesh
Thanks, Kaiesh
荣誉圣地亚哥Rebella:Add日历事件从网络.vcs的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");
?>