Add Calendar event to Android from web .vcs download

前端 未结 1 993
鱼传尺愫
鱼传尺愫 2020-12-02 14:01

my current problem is the following; I am creating a website with two files for download(.vcs and .ics) that will add an event to the device calendar once c

相关标签:
1条回答
  • 2020-12-02 14:16

    Finally got it working adding a link to a location with this index.php

    <?php
    header("Content-Type: text/x-vCalendar");
    header("Content-Disposition: attachment; filename=london2012.vcs");
    ?>
    BEGIN:VCALENDAR
    PRODID:-//AT Content Types//AT Event//EN
    VERSION:2.0
    METHOD:PUBLISH
    BEGIN:VEVENT
    DTSTAMP:20120801T133822Z
    CREATED:20120801T042948Z
    LAST-MODIFIED:20120801T043003Z
    SUMMARY:Olympic Games
    DTSTART:20120727T000000Z
    DTEND:20120812T000000Z
    LOCATION:London
    URL:http://www.london2012.com/
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR
    

    Then from Android it downloads the file and you can import it to the calendar. Hope is usefull for someone else...

    0 讨论(0)
提交回复
热议问题