Changes
/* Buttons */
== Introduction ==
The Dynamic Configurable start screen feature allows the {{UBIK Service engineer }} user to tailor the buttons on the start screen according to the needs of the customer.
== Setup ==
* The first step is to configure the start screen data using an xml in order for UBIK® {{UBIK}} to recognize the different tabs and buttons. The xml file, which must have the name '''css_config.xml''', should be placed under '''''SD_CARD''/Android/data/''APP_PACKAGE_NAME''/files/UIConfigurations''' where{| class="wikitable" | width = "50%"|-! Parameter!! Purpose|-| ''SD_CARD''|| represents in the root of the external storage of a device[[UI_Configuration_(Mobile_Client)|-| ''APP_PACKAGE_NAME''|| is the concatenation of "comUI Configurations folder]].augmensys.ubik." and the application name, e.g. ''demo'', ''manualtest'', ''companyname'' etc.|}
* After the folder is configured, the next step is to validate the XML configuration file against the [http://wiki.augmensys.com/index.php/File:Start_Screen_Configuration_Schema.zip schema] using an online validator. A solution can be found at [http://www.utilities-online.info/xsdvalidation/ Online XML Schema Validator]. The schema used to validate against will be found inside the UBIK Folder and is named ConfigurableStartScreenSchema.The following xml shows an example configuration (also can be downloaded as [http://wiki{{FileLink|Start_Screen_Configuration.augmensys.com/index.php/File:zip|Start_Screen_Configuration.zip }} an xml file]):
<source lang="xml">
<StartScreenConfiguration>
https://www.google.com/maps/place/Linz/@48.295065,14.327405,12z/data=!3m1!4b1!4m2!3m1!1s0x47739595fa99854d:0x7c53292c577975c4
</TargetURI>
</CustomIntentButton>
<CustomIntentButton caption="Skype">
<TargetClass>
com.skype.raider.Main
</TargetClass>
</CustomIntentButton>
<CustomIntentButton caption="Maps">
<TargetClass>
com.augmensys.ubik.demo.lib.ui.activities.ar.map.UBIKMapActivityDemo
</TargetClass>
</CustomIntentButton>
<TargetMapsButton caption="Flow Controller 213" UBIK-UID="2ccd91c0-9cee-42f3-9d1d-be745908457d"/>
<ARNavigationButton caption="Flow Controller 213" UBIK-UID="2ccd91c0-9cee-42f3-9d1d-be745908457d"/>
<NavigationMapsButton caption="Flow Controller 213" UBIK-UID="2ccd91c0-9cee-42f3-9d1d-be745908457d"/>
<DemoMapsButton caption="Flow Controller 213" UBIK-UID="2ccd91c0-9cee-42f3-9d1d-be745908457d"/>
<RFIDScanButton caption="RFID Scan" />
</Tab>
</StartScreenConfiguration>
</source>
{{Hint|The config file has to be named '''css_config.xml'''. }}
== Tab groups ==
== Buttons ==
Buttons should be placed inside tab elements and can be parameterized. Buttons are configurable in terms of
* Icon(Parameter: ''iconPath'')* Caption(Parameter: ''caption'')* Group/tab(name of tab group)* Action + Parameters Object UID if needed(Parameter: ''UBIK-UID'')
{{Hint|The icons are specified by their relative paths under '''''SD_CARD''/Android/data/''APP_PACKAGE_NAME''/files/UIConfigurations/CSSButtonIcons''' }}
The supported button types are as follows:
== Configuration guidelines ==
* See [[UI_Configuration_(Mobile_Client)]]* The '''maximum number of tabs is 6'''. Once this limit is exceeded, the configuration is invalid and won't be shown.
* The captions of tabs are optional. In case there's only one tab, the tab will be invisible.
* The '''buttons ''' should always be '''nested inside tabs'''. Otherwise, the configuration is also invalid.* When either the caption parameter or the icon parameter is not explicitly customized in the xml file, default caption Captions and icons, specific to each button, of buttons are optional. Default values are usedfor the unspecified ones.* While configuring the [[Custom Intent Button|custom intent button]], one should always specify one and only one of the target class and the target URI. Otherwise, the button is invalid and the an error will be shown.* The configuration of the ''UBIK-UID '' parameter is obligatory should always be specified for AR Navigation POI View Button, AR Navigation Maps Button, Demo Maps Button and Target Maps Button. {{Attention|The configuration is only applied when the app starts. Close the app completely (not only move it to the background) and restart it to make sure the configuration is read.}}
== Results ==
The result is that the tabs and buttons configured in the XML file will be visible and open the right activity once they are clicked.
The following screenshots demonstrates demonstrate the results of the example XML configuration.<br/>[[File:UI_Android_CSS_Buttons_Tab1.png|500px|border|alt=The First Tab|The First Tab]]<br/>[[File:UI_Android_CSS_Buttons_Tab2.png|500px|border|alt=The Second Tab|The Second Tab]]<br/>[[File:UI_Android_CSS_Buttons_Tab3.png|500px|border|alt=The Third Tab|The Third Tab]]
After users log in, the buttons are enabled and colored. Upon being clicked, they should trigger different actions.
<br/>[[File:UI_Android_CSS_Buttons_After_Login.png|500px|border|alt=Buttons After Login|Buttons After Login]] == See also ==* [[UI_Configuration_(Mobile_Client)]]* [[Custom_Intent_Button]]
[[Category:How-ToAndroid|Configure Start Screen Content]][[Category:UBIK ClientHow-To|Configure Start Screen Content]][[Category:UBIK AndroidPublishing|Configure Start Screen Content]]