Developing a Native Mobile Mini App with GeneXus is similar to developing any other application, with the caveat that there are some considerations and limitations to take into account.
When developing a native Mini App, you have the flexibility to use a different GeneXus version than the one used for developing the Super App (if it is also built with GeneXus) or the version of the Super App Render included in a non-GeneXus Super App. This flexibility allows you to maintain separate development cycles for the Super App and Mini Apps.
However, it is crucial to ensure compatibility between the Mini App and the Super App Render versions. The Super App may be using a specific version X of the Super App Render (GeneXus Flexible Client), while the Mini App may be generated with another version Y corresponding to the GeneXus version used. Differences between these versions can sometimes lead to compatibility issues.
A compatibility problem could occur when the Super App's Render tries to load a Mini App's metadata that is not compatible. However, this rarely happens because the metadata format usually does not change significantly between GeneXus’s versions, and when it does, the Render is generally backward compatible. This allows the Super App to continue working smoothly with Mini Apps built in previous versions of GeneXus.
In exceptional cases, the Mini App's metadata format may change in a way that is no longer compatible with a previous Render version. To detect such situations, the metadata is versioned with the information of the GeneXus version it was generated with.
The version details can be found within the metadata, specifically in the "<main>.json" file, under the name "metadata_schema_version." This version number follows the format of MAJOR.MINOR.PATCH, consisting of three numbers.
It is worth noting that the Super App Render actively supports all MINOR and PATCH updates within a specific MAJOR version. Furthermore, when transitioning to a new MAJOR version, the Super App Render maintains compatibility with the previous MAJOR version. This allows for a smooth implementation process, eliminating the need to update both the Super App and all Mini Apps simultaneously. Each release of a new MAJOR version will indicate which previous version is no longer compatible.
To ensure seamless interoperability, the Super App Render will provide messages in cases where a Super App attempts to open a Mini App with a different version of metadata.
For security reasons, each Mini App must be sandboxed in order to prevent one Mini App from accessing the data of another. Therefore, some features available for application development have a particular behavior when executed as Mini Apps.
The Id property of the ClientInformation external object returns a unique identifier for each Mini App.
Each Mini App will have its own internal storage that cannot be shared between Mini Apps and the Super App.
When clearing the cache of a Mini App, either explicitly via API or implicitly with the expiration properties (by time or quantity), all cached information on the device about this Mini App is deleted. ClientStorage is a particular case of this.
If you need to keep this information in successive executions of the Mini App, you should consider the option of storing it server-side.
Currently, the use of the File and Directory data types is not supported when an app is generated as a Mini App. In the future, support may be added, allowing access to the file system areas defined by the Super App, subject to permission requests.
The same restrictions apply to the external object GeneXus.SD.Media.Files.
Colors defined in the "Application" Class, such as gx-accent-color and gx-action-tint-color, are not taken from the defined Mini App but from the Super App. This is an Android limitation; those colors are taken from the Style of the host application and cannot be changed dynamically.
Language settings in Super App and Mini Apps operate independently.
When running the Super App, it adopts the Language set as the preferred one on the Device.
If SetLanguage() is executed at the Super App level, it won't impact the Language with which Mini Apps load; this will remain the default language of the Device. In the event of using SetLanguage() within a Mini App, this change applies only to that specific Mini App.