Adding an appointment into the device's calendar

326
2
12-19-2017 12:00 PM
by Anonymous User
Not applicable

Hi all.

Just wondering if anyone knows a way, using AppStudio, to add launch the workflow that adds an appointment to the device's calendar?

Cheers,

-Paul

0 Kudos
2 Replies
nakulmanocha
Esri Regular Contributor

Hi Paul,

Please go ahead and create a support ticket as an enhancement request.

Thanks,

Nakul

0 Kudos
by Anonymous User
Not applicable

For anyone who is interested, I think I've found a little javascript library that will create the ics file.

Called ics.js (link below),I had to edit it slightly to remove the references to the browser navigator object, and then delete the part that triggers the browser to actually save to disk and instead just grab the text output and use a FileFolder object in AppStudio to save to a text file with an *.ics extension.

Seems to be working so far, although I haven't tested much. I'm not sure what happens around timezones etc. Will have to do some testing...

GitHub - nwcell/ics.js: A browser firendly VCS file generator written entirely in javascript!!!!!! 

    Button{
        text: 'get calendar'
        onClicked: {
            var cal = ICS.ics();
            var subject = 'test subject'
            var description = 'test description'
            var location = 'test location'
            var begin = new Date();
            var end = new Date();
            cal.addEvent(subject, description, location, begin, end);
            var c =  cal.download()
            console.log(c)
            tempFolder.writeTextFile('test.ics', c)
        }
    }
    FileFolder{
        id: tempFolder;
        path: 'd:/temp'
    }

0 Kudos