Triggers: Difference between revisions

No change in size ,  7 October 2016
m
no edit summary
mNo edit summary
mNo edit summary
Line 467: Line 467:


<source lang="javascript">
<source lang="javascript">
i = intent("android.intent.action.INSERT")       // Create Intent object
i = intent("android.intent.action.INSERT");      // Create Intent object
i.data("content://com.android.calendar/events")   // Data contains Google Calendar URI
i.data("content://com.android.calendar/events")// Data contains Google Calendar URI
i.extra("title", entry().field("Title"))         // Get event name from field Title
i.extra("title", entry().field("Title"));        // Get event name from field Title
i.extra("description",
i.extra("description",
     entry().field("Description"))                 // Get description from field Description
     entry().field("Description"));                // Get description from field Description
i.extraLong("beginTime",
i.extraLong("beginTime",
     entry().field("Begin").getTime())             // Get start time from field Begin
     entry().field("Begin").getTime());            // Get start time from field Begin
                                                   // Begin is of type DateTime
                                                   // Begin is of type DateTime
                                                   // Additional parameter is of type Long,
                                                   // Additional parameter is of type Long,
                                                   // so extraLong() is used for conversion.
                                                   // so extraLong() is used for conversion.
i.extraLong("endTime",
i.extraLong("endTime",
     entry().field("End").getTime())               // Get end time from the field End
     entry().field("End").getTime());              // Get end time from the field End
                                                   // Requires same conversion as above
                                                   // Requires same conversion as above
i.send()                                         // Send the message
i.send();                                        // Send the message
</source>
</source>


== JavaScript links ==
== JavaScript links ==
{{Template:JavaScriptLinks}}
{{Template:JavaScriptLinks}}