User Tools

Site Tools


en:wiki:2.-desarrollo-app:2.3.-codigo:a.-estructura-xml:1.-nodo-app:start



APP Node


Node in which the special and main features of the app will be defined in, for each and every one of the collections.

It is made of:

  1. Attributes which provides that features.
  2. Nodes.


An example format would be the following one:

    <app 
        prefix="gen" 
        version="0.0.28.390" 
        debug="false" 
        sql-debug="false" 
 
        keyboard-bar-visible="true" 
        keyboard-bar-bgcolor="C1B82F" 
 
        autologon="false" 
        load-wait="true" 
        screen-orientation="portrait" 
        resolution-width="720" 
        resolution-height="1280" 
        companycolor="#C1B82F" 
        forecolor="#FFFFFF" 
        entry-point="MenuPrincipal">
 
	<!-- El atributo strict-mode="true" indica al framework que revise el fichero .CSS en busca de errores -->
        <style url="default.css" strict-mode="true" />
        <style url="default-ios.css" conditions="ios" strict-mode="true" />
    	<style url="default_hor.css" conditions="phone:horizontal" strict-mode="true" />
    	<style url="default_hor.css" conditions="tablet:horizontal" strict-mode="true "/>
 
        <!-- También se pueden incluir aquí los ficheros vbs y js en lugar de hacerlo en la colección de empresas -->
        <include file="funciones.js" language="javascript" />
 
        <connection name="mtto" connstring="bd/gestion.db" />
 
        <!-- Conexión con la BD de réplica de ficheros (Solo Android)-->
        <connection name="Info_ReplicaFiles" connstring="Provider=Xone Remote Provider;Data Source=local;ProgID=com.xone.db.impl.replicafiles.RplFilesConnection;DBMS Name=Ibd;User Name=sa;Password=;appname=ClientMobility;Timeout=60" prefix="" />
 
        <!-- Colección de Login Personalizada, que puede ser un fichero XML externo al mappings --> 
        <!-- Este nodo viene a sustituir al atributo login-coll="true" que se especificaba en el nodo coll de la colección de login,
             de forma que así tenemos mejor localizada la colección de login, además de poder especificar condiciones y llamar a un login u otro... -->
        <login-coll>
		<item name="LogonColl" conditions=""></item>
	</login-coll>
 
	<!-- Este nodo también viene a sustituir al atributo entry-point="ColeccionEntrada" que se definía en el nodo app. 
             También aquí podemos especificar condiciones para que entre en una colección u otra -->
	<entry-point>
		<item name="portadaQ" />
		<item name="portadaQTH" conditions="tablet:horizontal" />
		<item name="portadaQ" conditions="phone;hiphone" />
	</entry-point>
 
    </app>


NODE ATTRIBUTES:

ATTRIBUTEDESCRIPTION
prefixNode to define the ##PREF## macro, it is used in the SQL of the mappings collections.
versionDefinition of the mappings version. The XOnestudio, when saving the mappings, automatically increases this number, un such way that we will be able to have the control of versions.
companycolorTo define a general color for the whole app. They are colors applied to the tabs menus or selections, as long as in that places we cannot any colors for that areas. Colors are passed.
forecolorThe texts color in general way. Colors are indicated.
compatibility-mode Mode in compatibility with previous versions. It is good to use it if we have an app made with previous versions of other frameworks, in order the view hasn´t a dramatic change. “true” or “false” values. By default, “false”.
hardware-keyboardAutomatically showing or not the keyboard in the device, for this it is put to “true”, so we are indicating that the device has a hardware keyboard and then it doesn´t show the keyboard whenever we are placed in a field. It is only valid for the WM framework . By default is “false”.
debugIt is indicated to the framework that it is been executing in debug mode, so it will show us more information. This is for “Android” device, when we are working in debugging mode or with the :XOnestudio. “true” or “false” values, by default “false”.
sql-debugIt is indicated to the framework that log every SQL that are running in the framework. “true” or “false” values, by default “false”.
entry-pointThe framework is indicated that the entry to the app it is not appwizard anymore, but it is the collection name passed in this attribute. It is useful for making a customized menu.
screen-orientationThe framework is forced to always show the app in landscape mode or in portrait mode. The values can be landscape or portrait. For instance: screen-orientation=“portrait”.
resolution-widthWhen we put values in POINTS as for example the width of a button (Ex:width=“35p”), by changing resolution and taking another device, we want that value be “relative” and that find out automatically the correction factor for the new device. That is, we have to put the resolution which we have developed the app for, (For instance: resolution-width=“320”), so that if we use a device that has a resolution of 640 wide, it must multiply by 2 all the width specified in points.
resolution-heightSame than in the previous one, it is to relativize the sizes specified in points, by indicating the “original” resolution for which the app was created and it was “ok”, so that the framework recalculate sizes when it is into another device with another resolution different than the “original” one.
hypermedia true or false value (the false value is the default one). If it is true it enables the optimizations for the hipermedia apps. THIS FRAMEWORK IS COMMERZIALIZED SEPARATELY
fullscreen true or false values (the false value is the default one). If it is true the app will be displayed in full screen by hiding the status bar of the mobile device. For instance: in the iPad the bar with time and battery status.
autologon true or false value (the false value is the default one ). This attribute controls automatic login for applications that do not need it. To make it work it is necessary to have an admin user with an empty password in the database.
use-analyticstrue or false values (thefalse value is the default one).
analytics-typegoogle or nielsen values (http://www.google.com/intl/es/analytics/ or http://es.nielsen.com/products/ac.shtml).
analytics-nielsen-domainstring value. url with the domain name by following the Nielsen specifications for native apps.
analytics-uidstring value. It indicates the UID for Google analytics or the client id for Nielsen.
default-languagestring value. It indicates the language by default for the scripts if it is not specified in the tag where the script is defined. (vbscript or javascript).



iOS EXCLUSIVE ATTRIBUTES

ATTRIBUTEDESCRIPTION
google-api-enabletrue or false. By default, iOS uses the Apple services to locate the coordinates we are going to show in a contents of mapview type. If we want to use the Google APIs for a better location and that the location be exactly the same than in Android, we must put this attribute to true.
google-api-keyHere, we will put the value of the key API that Google provides us in order to use its services, if the attribute is to true, we must specify a value.



SUBNODES OF THE APP NODE AND ITS ATTRIBUTES:

<login-coll> Node


Node that points to the collection for login in the app.

ATTRIBUTEDESCRIPTION
nameThe name of the collection that will be our login window. Case Sensitive.
conditionsSame condition as the other nodes. (Orientation, platform/OS, Phone/tablet)


<!-- Colección de Login Personalizada, que puede ser un fichero XML externo al mappings --> 
<!-- Este nodo viene a sustituir al atributo login-coll="true" que se especificaba en el nodo coll de la colección de login,
     de forma que así tenemos mejor localizada la colección de login, además de poder especificar condiciones y llamar a un login u otro... -->
 
<login-coll>
	<item name="LogonColl" conditions=""></item>
</login-coll>

<entry-point> Node


Node that points to the main menu collection.

ATTRIBUTE DESCRIPTION
nameName of the main menu collection. Case Sensitive.
conditionsSame conditions as the other nodes. (Orientation, platform/OS, Phone/tablet)


<!-- Este nodo también viene a sustituir al atributo entry-point="ColeccionEntrada" que se definía en el nodo app. 
     También aquí podemos especificar condiciones para que entre en una colección u otra -->
<entry-point>
	<item name="portadaQ" />
	<item name="portadaQTH" conditions="tablet:horizontal" />
	<item name="portadaQ" conditions="phone" />
</entry-point>


<style> Node


Node to define the CSS used in the app.

ATTRIBUTEDESCRIPTION
urlIt indicates the CSS file name that it is going to be used in the app.
strict-mode=“true”It makes the framework to parse the .CSS file looking for errors.


More info here

<battery> Node


Node to control the battery, by showing messages according the indications of its attributes.
IMPORTANT: It is only valid for the Windows Mobile framework.

ATTRIBUTEDESCRIPTION
Limit3First warning message, by indicating that it has the percentage of battery that we put as value in the attribute.
Limit2Second warning message, with the indicated percentage.
Limit1Third and last warning message, by indicating that in some 5 seconds the app will be closed in a controlled manner. It may have any data loss, which will be those ones that are on screen and they have not been saved. Any other data wont be lost.


en/wiki/2.-desarrollo-app/2.3.-codigo/a.-estructura-xml/1.-nodo-app/start.txt · Last modified: 2018/11/21 13:43 by ejetoro