Gets the client variables of the hybrid app with given module id and version.
<static> getClientVariables( moduleID, version ) → {hwc.ClientVariables}
| Name | Type | Description |
| moduleID | number | The module ID of the hybrid app. |
| version | number | The version of the hybrid app. |
A hwc.ClientVariables object, or null if there are no ClientVariables for the hybrid app with the given module id and version.
Type:
var apps = hwc.getInstalledApps();
// Loop through the apps, showing the client variables for each one.
for( var i = 0; i < apps.length; i++ )
{
var app = apps[i];
// Get the client variables.
var clientVariables = hwc.getClientVariables( app.getModuleID(), app.getVersion() );
if( clientVariables.getCount() > 0 )
{
// Get all the names of the variables for this app.
var keys = clientVariables.getAllVariableNames();
// Loop through all the variable for this app.
for( var index = 0; index < keys.length; index++ )
{
// Get a specific variable by name.
var variable = clientVariables.getVariableValueByName( keys[index] );
alert( "variable name: " + keys[index] + "\
variable value: " + variable );
}
}
}