Persist Functionality

    When android runs low on resources the module activity can be destroyed if its in a suspended state and then restored when its resumed. This will result in a loss of variable state in the logic script. To restore variable state in the logic script use the following method to define the name of a single object that will saved and restored when the activity is destroyed and restored. For more information on how to use this function please look at the cookbook.

    • name the name of the object to restore

    persistObject(String name) ;

    Tab / Tab Group Functionality

    Show the tab group with the following reference and clear all values in the tab group.

    • ref the reference to the tab group

    newTabGroup(String ref) ;

    Show the tab with the following reference and clear all values in the tab.

    • ref the reference to the tab

    newTab(String ref) ;

    Show the tab group with the following reference. This will retain all the current values in the tab group.

    • ref the reference to the tab group

    showTabGroup(String ref);

    Show the tab group with the following reference and load the values of the supplied entity or relationship id into the tab group.

    • ref the reference of the tab group
    • id the id of the entity or relationship

    showTabGroup(String ref, String id);

    Show the tab group with the following reference and load the values of the supplied entity or relationship id into the tab group.

    • ref the reference of the tab group
    • id the id of the entity or relationship
    • callback callback to execute when finished loading

    showTabGroup(String ref, String id, FetchCallback callback);

    Show the tab with the following reference. This will retain all the current values in the tab.

    • ref the reference to the tab

    showTab(String ref) ;

    Show the tab with the following reference and load the values of the supplied entity or relationship id into the tab.

    • ref the reference to the tab
    • id the id of the entity or relationship

    showTab(String ref, String id) ;

    Show the tab with the following reference and load the values of the supplied entity or relationship id into the tab.

    • ref the reference to the tab
    • id the id of the entity or relationship
    • callback callback to execute when finished loading

    showTab(String ref, String id, FetchCallback callback) ;

    Save the tab group with the following reference.

    • ref the reference of the tab group
    • id the id of the entity or relationship. Can be null to save new record
    • geometry the geometry list of the record
    • attributes additional attributes to save for the record

    saveTabGroup(String ref, String id, List geometry, List attributes);

    Save the tab group with the following reference.

    • ref the reference of the tab group
    • id the id of the entity or relationship. Can be null to save new record
    • geometry the geometry list of the record
    • attributes additional attributes to save for the record
    • callback code to execute when saving is finished

    saveTabGroup(String ref, String id, List geometry, List attributes, SaveCallback callback);

    Save the tab group with the following reference.

    • ref the reference of the tab group
    • id the id of the entity or relationship. Can be null to save new record
    • geometry the geometry list of the record
    • attributes additional attributes to save for the record
    • callback code to execute when saving is finished
    • enableAutoSave specify if you want to enable autosaving

    saveTabGroup(String ref, String id, List geometry, List attributes, SaveCallback callback, boolean enableAutoSave);

    Save the tab group with the following reference.  Passing a SaveForceCallback causes the callback to be executed regardless of there being changes that needed to be saved or not.  Its onSave() receives a third argument: a boolean to denote whether or not changes had occurred.

    • ref the reference of the tab group
    • id the id of the entity or relationship. Can be null to save new record
    • geometry the geometry list of the record
    • attributes additional attributes to save for the record
    • callback code to execute when saving is finished, regardless of changes existing

    saveTabGroup(String ref, String id, List geometry, List attributes, SaveForceCallback callback);

    Save the tab group with the following reference.  Passing a SaveForceCallback causes the callback to be executed regardless of there being changes that needed to be saved or not.  Its onSave() receives a third argument: a boolean to denote whether or not changes had occurred.

    • ref the reference of the tab group
    • id the id of the entity or relationship. Can be null to save new record
    • geometry the geometry list of the record
    • attributes additional attributes to save for the record
    • callback code to execute when saving is finished, regardless of changes existing
    • enableAutoSave specify if you want to enable autosaving

    saveTabGroup(String ref, String id, List geometry, List attributes, SaveForceCallback callback, boolean enableAutoSave);

    Duplicate the tab group with the following reference.

    • ref the reference of the tab group
    • geometry the geometry list of the record
    • attributes additional attributes attributes to save for the record
    • excludeAttributes exclude attributes from being saved to the record
    • callback code to execute when saving is finished

    duplicateTabGroup(String ref, List geometry, List attributes, ListexcludeAttributes, SaveCallback callback);

    Disable autosave for tabgroup. If there are any unsaved changes, they are saved before autosave is disabled. If a save occurs, the SaveCallback passed to the saveTabGroup function is executed.

    • ref the reference of the tab group

    disableAutoSave(String ref)

    Force an autosave for the tabgroup which currently has autosaving enabled. The SaveCallback passed to the saveTabGroup is executed.

    void triggerAutoSave()