Application Shortcuts property

Official Content
This documentation is valid for:
Specifies user-initiated actions for the application.

Scope

Objects: Menu, Panel, Work With (Only Main Objects)
Generators: Android, Apple

Description

The Application Shortcuts property is available under the Main object properties.

With this property, you can define some actions that can be triggered directly from the home screen by the end user. Some use cases of shortcut actions are listed below. There can be many more depending on your application needs.

  • Email: New email, Inbox, Search email
  • Camera: Take selfie, Record video
  • Maps: Take me home, Share location, Search nearby, Request service at my location
  • etc...

In GeneXus, simply create a Menu object whose items will be the actions displayed in the shortcut widget. Also, you can associate an icon with each action by using the Image property of the Action node, and change its label through its Description property.

The icon defined in the Image property can be set by using:

  1. Predefined icons
    Each platform has a predefined list of icons. For using them, you must add the "gx" prefix to the system icon name in the Image property. That is:
    iOS icon (e.g. gxLocation_TakeMeHome).
  2. Custom icons
    Simply add an Image object to the Knowledge Base, and reference it from the Image property. Remember that the icon will not be displayed with colors.

Finally, set in the Application Shortcut property the Menu object previously created. In iOS devices, the actions available are displayed when the end user uses 3D Touch (applying pressure on the screen when selecting the application icon).

Run-time/Design-time

This property applies only at design-time.

Samples

First, create a Menu object and define your application shortcuts. In this case, you will create four actions: play a new game, view the user profile, display the user playlist, and go to the chatroom.
image_2018351043_1_png

Next, associate a custom icon with each action and customize its description. For instance, in the PanelChat action, change the Image and Description properties as follows:
PanelChat2_png

Finally, set the MenuShortcut object (previously created) in the Application Shortcuts property of our Main object. MainObject_png

At runtime, the end user will be able to display every action you have defined and select any of them to open it.
image_201835103331_1_png 

How to apply changes

To apply the corresponding changes when the property value is configured, Build the Main Object.

Compatibility

Available for Android as of Genexus 17 upgrade 3. Available for Apple as of Genexus 15 upgrade 10.

See Also