AVM allows app writers to define global properties for the application. The global properties can be used to parameterize the following attributes

These attributes can include global property in their definition. When these attributes are evaluated, they are first deparameterized. That is, the global property is evaluated and substituted.

For example, an action “CALL_URL” has a target=”<GLOBAL:home_address>/user/auth” and the global property home_address is set to Before executing the URL, the target will be evaluated to

Global Properties are defined in “_properties” table in local Content database (Android - yourProject/assets/yourapp_content.sqlite, iOS - yourProject/Resources/assets/yourapp_content.sqlite). The global property can be added by inserting a row in the “_properties” table. See Working with local content database for more details.


This action is used to modify global property at run-time. The global property can be modified in an app definition file (XML) or using an action FUNCTION.

One of the most common use of Global Property is to save the server URL. A Global Property called server_address can be defined with value as “”. Once tested and the app is ready for publishing the global property can be changed to point to the production URL This change is done only at one place and now all the URL’s used in the app point to the production server.

Attributes Value Mandatory
event_list comma separated list of events, eg: TAP Yes
input_parameter_list comma separated list of values for a global property Yes
target_parameter_list comma separated list of global property to be saved Yes

Example 1

On application launch, save the global property “server_address” as “”. Now “server_address” can be used in various attributes that may contact the server for example, attribute “target=<GLOBAL:server_address>/user/auth” of the action CALL_URL will evaluate to “target=”.

<screen_deck name="appemble-docs" version="1.0" short_description="Appemble Docs"
    long_description="Appemble tutorial app" publisher_name="Appemble"
    publish_date="2012-05-31" starting_screen_name="screen_1" background="tu_background.png"
        <action name="SET_GLOBAL_PROPERTY" event_list="ON_APP_LAUNCHED"

Set Global Property

In this example, when the user presses the button, a FUNCTION is called. The FUNCTION then sets the global properties “server_address” and “region”.

    <screen name="remotelist" screen_type="SCREEN"
            initial_layout="PORTRAIT" allowed_layouts="BOTH"
            width="100" height="100">
    <control type="PUSHBUTTON" x="39" y="24" width="50" height="8"
            appearance_name="button_gradient" data_type="VARCHAR"
            default_value="Button 2">
            <action event_list="TAP" action_name="FUNCTION"

Define a custom function called SaveGlobalPropertiesFunction

public class SaveGlobalPropertiesFunction implements CustomFunctionInterface {

    public SaveGlobalPropertiesFunction() {}

    public Object execute(final Context ctx, final View v, final View pView, ActionModel a,
            Bundle targetParameterValueList) {

        // Create a new action to change the appearance
        ActionModel saveGlobalPropertyAction = new ActionModel(a.sSystemDbName, a.sContentDbName);
        // Set the action name
        // Set the appearance_id = red. Appearance with name="red" or "green" are defined in the appearance.xml
        targetParameterValueList.putString("server_address", "");
        targetParameterValueList.putString("region", "test");
        // Execute the action
        Action.callAction(ctx, v, pView, saveGlobalPropertyAction, targetParameterValueList);

        return Boolean.valueOf(true);