Changes

HowTo:Configure Start Screen Content

1,437 bytes added, 09:18, 31 August 2016
/* Buttons */
== Setup ==
* The first step is to configure the start screen data using an xml in order for {{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 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>
<TargetClass>
com.skype.raider.Main
</TargetClass>
</CustomIntentButton>
<CustomIntentButton caption="Maps">
<TargetClass>
com.augmensys.ubik.demo.lib.ui.activities.ar.map.UBIKMapActivityDemo
</TargetClass>
</CustomIntentButton>
{{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)* 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''' }}
<gallery heights="100">
File:UI_Android_CSS_Buttons_Content_Browser.jpg‎|Content Browser Button
File:UI_Android_CSS_Buttons_Content_Browser_Events.jpg|Content Browser Button For An Arbitrary ObjectFile:UI_Android_CSS_Buttons_Custom_Intent.jpg‎png‎|Custom Intent Button
File:UI_Android_CSS_Buttons_Maps.jpg|Maps Button
File:UI_Android_CSS_Buttons_Maps.jpg|Target Maps Button
File:UI_Android_CSS_Buttons_Nav_Maps.jpg|Navigation Button
File:UI_Android_CSS_Buttons_AR_Navigation.jpg|AR Navigation Button
File:UI_Android_CSS_Buttons_Demo_MapsUI_Android_CSS_Buttons_Barcode.jpgpng|Demo Maps Barcode Scan Button
File:UI_Android_CSS_Buttons_RFID_Scan.jpg|RFID Scan Button
File:UI_Android_CSS_Buttons_OCR_Scan.png|OCR Scan Button {{Version/AndroidSince|2.5.0}}
</gallery>
{| class="wikitablesortable" | width = "5070%"
|-
! Button!! Purpose!! Parameters
|-
| ''Content Browser ButtonContentBrowserButton''|| Opens a content browser for displaying an object or the root if no object/uid is specified.|| ''UBIK-UID'': UID of object to be shown on map
|-
| ''Custom Intent Button[[Custom_Intent_Button|CustomIntentButton]]'' || Launches a certain application or URI for the specified intent (using a customized intent URI or target class). || Launches a certain application ''TargetClass'': name of an activity or URI for the specified Intent.an application<br />''TargetURI'': link information
|-
| ''Maps ButtonMapsButton''|| Opens {{UBIK}} map.|| -
|-
| ''Target Maps ButtonTargetMapsButton''|| Opens {{UBIK}} map for a target object.|| ''UBIK-UID'': UID of object to be shown on map
|-
| ''ID Marker Scan ButtonMarkerScanButton''|| Starts ID marker scanning.|| -
|-
| ''QR Scan ButtonQRScanButton''|| Starts QR code scanning.|| -
|-
| ''POI View ButtonPOIViewButton''|| Opens {{UBIK}} POI view.|| -
|-
| ''Configurable AR ButtonConfigurableARButton''|| Opens the ID marker 3D view.|| -
|-
| ''Configurable Image Marker ButtonConfigurableImageMarkerButton''|| Opens the markerless view.|| -
|-
| ''AR Navigation POI View ButtonARNavigationPOIViewButton''|| Opens {{UBIK}} POI view with the AR navigation support.|| ''UBIK-UID'': UID of object to be navigated to
|-
| ''AR Navigation Maps ButtonARNavigationMapsButton''|| Opens {{UBIK}} map for the specified object.Starts navigating to the specified object.|| ''UBIK-UID'': UID of object to be navigated to
|-
| ''Demo Maps ButtonBarcodeScanButton''|| Starts navigating to the specified object in demo appbarcode scanning.|| -
|-
| ''RFID Scan ButtonRFIDScanButton''|| Starts RFID scanning.|| -|-| ''OCRScanButton''|| Starts OCR scanning. {{Version/AndroidSince|2.5.0}} || -
|}
 
=== Color of Buttons ===
 
If no user is logged in the buttons are de-saturated. Once a user is logged in the buttons are colored according to following behaviour:
* If default buttons are used the buttons are colored programmatically. The button and the color can be customized by the Development.
* If custom buttons are used (specified by the parameter "iconPath") the original color of the button is retained.
 
[[Category:Android|Configure Start Screen Content]]
[[Category:How-To|Configure Start Screen Content]]
[[Category:Publishing|Configure Start Screen Content]]
== 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.
* Captions and icons of buttons are optional. Default values are used for 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 an error will be shown.* The configuration of the ''UBIK-UID '' parameter 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 ==
<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:Android|Configure Start Screen Content]][[Category:How-To|Configure Start Screen Content]][[Category:Publishing|Configure Start Screen Content]]
335
edits

Help improve this page!