Set Application Settings Properties

With the App Settings tab, you can expose application-level settings so that users of the app have the freedom to modify the properties you expose and change the app's behavior.

For instance, you might want to give users the ability can developers can choose to set the following for an application:

To set App Settings properties, do the following:

  1. Go to Project Properties window.
  2. Click the App Settings tab. The following dialog appears.

  3. The settings under the common header are common across all platforms. You can create platform specific settings under a new header by clicking the Configure button and setting platforms on which the setting will be rendered on.
  4. Select to add a setting for an application that the user can configure.
  5. Set the following:
    • Key: specifies a unique identifier for each setting.
    • Display Name: specifies the name to be displayed for a setting(key).
    • Display Option: specifies the way in which the settings are set. For example, if you set your display option as a textbox in the settings of the application, once the application is built and deployed , you can set the settings for that key as text in a textbox.
    • Keyboard Type: specifies a keyboard type if the Display Option set is textbox. For more information on Keyboard types see the Kony Visualizer Widget Programmer's Guide.
    • Default Value: Specifies the default value for each key.

      The following illustration depicts the settings built and deployed for iPhone that correspond to the Application settings configured in Kony Visualizer.

Use cases for different Display Options

Textbox

You can set a display option as a textbox and use the application settings APIs to read or write the values set to the application. In the figure above User Name is a value entered in a textbox. You can read this key and its corresponding value use it anywhere in the application. The values in this field are stored as a string in appsettings.

Label

You can set a label in application settings for two purposes. First to read/write the value of the label to the application. Second you can use the label as a separator in the settings area itself to show different types of settings. The values in this field are stored as a string in appsettings.

Switch

You can set permissions for an application using the Switch display option. For example if you use the appsettings APIs to read the value of the switch and if the value is false you can disable some functionality of that application. The values in this field are boolean.

Single Select

If you set the Single Select display option, you provide the user with the option to select only one value from a list of given options. When you select your Display Option as singleselect, in the Default Value column click to define multiple values and the default value set is the first value in the first row. Suppose you define multiple views for a segment in the appsettings area, the user can select any one of the listed views using the settings. Using the appsetting APIs, the value the user selects can be assigned to frm.segment.view="" and the view can be changed at runtime. The values in this field are stored as string. The figure below depicts how single select is viewed on application settings.

Multi Select

If you set the Multi select display option, you provide the user to select multiple values from a list of given options. When you select your Display Option as multiselect, in the Default Value column click to define multiple values and the default value set is the first value in the first row. Suppose the user sets multiple values for locations, the locations set are returned as a lua table and can be assigned to any widget using the application settings APIs. The figure below depicts how multiselect is rendered on iPhone.

Copyright © 2013 Kony, Inc. All rights reserved.