GeneXusSuperApp Module

Unofficial Content
This documentation is valid for:

The GeneXusSuperApp module is intended for the development of Super Apps with GeneXus. Implements the following functionalities:

  1. Allow the Super App to query the Mini App catalog in the Provisioning Server, filtering with various criteria.
  2. Allow a Super App to load a Mini App and transition to it.
  3. Mini App cache management.

Detail

The module GeneXusSuperApp is compound by two External object:

  • MiniApps
  • Provisioning

And these helpers as Structured Data Type (SDT)

  • MiniAppInformation
  • CachedMiniApp

Note that these External objects are only available when running in a Super App. If the app is not a Super app, or called from a Mini App, then all methods will fail.

Helper Data Types

SDT MiniAppInformation

A Structure Data Type containing the detailed information of a Mini App.

The following members are part of this SDT (there may be more if needed):

  • Id: String - the Mini App identifier as required by the Load method (see below)
  • Name: String - the Mini app's human-readable name
  • Description: String - a short description of the Mini App
  • Metadata: URL - Url pointing to the Mini App metadata
  • EntryPoint: String - Mini App main name
  • ServiceURL: URL - Url pointing to the Mini App backend service URL
  • Signature: String - Mini App signature
  • Version: Integer - Mini App version
  • Icon: Image - an application icon for the Mini App
  • Banner: Image - an alternative image for promoting or featuring the Mini App
  • Card: Image - an alternative image to present the Mini App in the Super App

Provisioning External Object

It includes the following properties and methods:

Properties

ProvisioningURL: URL

Read-only property returning the Provisioning Server's URL.

Methods

These methods allow the Super App to query the Mini App catalog in the Provisioning Server, filtering with various criteria. You need to configure the super application properties to access the corresponding catalog (*)

Notes on returned MiniAppInformation fields:

  • Metadata & ServiceURL are required (should be not empty)
  • Icon, Banner & Card are optional (can be Empty) and could be relative URLs. In case URLs are relative, Provisioning implementations transforms URLs to absolute, being URLs relative to ProvisioningURL.
GetByText(&text, &start, &count): collectionOf(MiniAppInformation)

Returns the list of Mini Apps that match the given text criteria. The search is performed by doing a full-text search on the Mini Programs (name, title, description).

Parameters:

  • &text: String - The string with the search criteria.
  • &start: Integer - 0-based index from which elements will be returned.
  • &count: Integer - maximum number of returned elements ( 0 means all ).

Returns:

  • A collection of MiniAppInformation.
GetByLocation(&geopoint, &radius, &start, &count): collectionOf(MiniAppInformation)

Returns the list of Mini Apps that are available inside the circular region with the center in the given &geopoint and a maximum radius given by &radius.

Parameters:

  • &geopoint: Geopoint - The center point of the specified region.
  • &radius: Numeric - The radius in meters of the circular region.
  • &start: Integer - 0-based index from which elements will be returned.
  • &count: Integer - maximum number of returned elements ( 0 means all ).

Returns:

  • A collection of MiniAppInformation.
GetByTag(&tag, &start, &count): collectionOf(&MiniProgramId)

When registering a Mini App in the provisioning server, several tags can be declared. This method will look for exact matches for the given tag.

Parameters:

  • &tag: String - The tag to search for.
  • &start: Integer - 0-based index from which elements will be returned.
  • &count: Integer - maximum number of returned elements ( 0 means all ).

Returns:

  • A collection of MiniAppInformation.
GetFeatured(&start, &count): collectionOf(&MiniProgramId)]

Return the list of Mini Apps declared as featured in a time window (validFrom <= &today =< validTo).

Parameters:

  • &start: Integer - 0-based index from which elements will be returned.
  • &count: Integer - maximum number of returned elements ( 0 means all ).

Returns:

  • A collection of MiniAppInformation.

MiniApps External Object

It includes the following methods

Methods

Load(in: &MiniAppInformation)

Loads a Mini App and transitions to it.

Parameters:

  • &MiniAppInformation: SDT - Input parameter with the Mini App information, as previously defined. The following validations should be performed on MiniAppInformation fields, otherwise load should fail:
    • EntryPoint should have the format {GUID}-{Name}, where {GUID} is the GUID of the KBObject type (currently valids are SDPanel, WorkWithSD and Menu (ex Dashboard)).
    • Signature should not be empty and should be valid for the downloaded metadata from URL in Metadata field (If cached, no re-validation is required).

If the Mini App does not exist in the Provisioning Server, or if it is not compatible with the current version of the Super App, the method call fails (aborting the composite block when appropriate).

GetCached(): collectionOf(&CachedMiniApp)

RemoveCached(&miniAppId, &miniAppVersion): boolean

ClearCached(): boolean

Install

You have to install GeneXusSuperApp module using the Manage Module References dialog from the Knowledge Manager option (located in the GeneXus IDE toolbar).  

Availability

GeneXus Beta

Scope

Generators:  AppleAndroid