HowTo: Using Calendar external object in Smart Devices

Unofficial Content
This documentation is valid for:

By adding Actions we can incorporate behavior to our Smart Devices Applications. Actions offer different ways to interact with the smart devices. This document explains how to schedule a date in the calendar from your Application.

Steps

  1. The transactions we are going to use are:
    CalendarTRNs
     
  2. Firstly, let’s see which methods and functionality the calendar object in the Smart Devices API offers.
    CalendarScheduleParameters - GeneXus 15
    There is one method available for Calendar; Schedule(). It has six configurable parameters.
     
  3. To add the action to the application.
    a) Got to the Work With Smart Devices Pattern tab.
    b) Select the Work with for Smart Devices Section Node, and drag&drop from the Toolbox a new button to the Application bar on the top of the layout of the WWSD and name it "Calendar".CalendarNewAction - GeneXus 15            
     
  4. The following step is to configure the event associated with the button. By double-clicking on the new action you can go to the event that is going to be triggered when the action is executed. The event has to have a call to the Calendar external object and the method Schedule with the parameters needed.
    CalendarActionEvent
    Note: Even though all of the parameters may not be used it is compulsory to include them in the code of the method call. If some are not used you can include the empty string ("") instead

Now we have our action configured.

Final result

Android iOS
CalendariOSExample1 - Genexus 15 CalendarAndroidExample1 - Genexus 15

Note: In Android, the scheduled meeting is opened and it is already saved. You have to tap on Cancel if you want to delete it. If you tap the Back button, then the event is saved anyway. That's so by the design of the Android API.

Scope

Platforms  Smart Devices (iOS, Android)

See also