Mobile App: Customization

Contents

Basic customizations

Advanced customizations

Note: for small systems using Cyclos we strongly advice to use the App and not to create their own build. The maintenance cost will be quite high and also other costs have to be made such as getting the app in the appstores and paying for an apple developer account.

Environment setup

To be able to edit (create new functionality, change the layout etc.) the mobile app it is necessary to setup the development environment. It is easiest to first setup the complete development environment for Cyclos, please follow the steps Environment setup. Subsequently add the following project to the eclipse workspace "cyclos3_mobile" and "cyclos3_mobile_android" this can be done in exactly the same way as described in step IV of the environment setup.


Install GWT (Google Web Toolkit, only needed for more advanced customizations)

Download source code mobile app
The sourcecode can be downloaded from Source forge.


Android


Eclipse Android installation

Phonegap can build the app online for all common smartphone platforms, but when changing the code of the app it is convenient to be able to directly test the app in a emulator. Below is described how to run the App in an Android emulator in Eclipse, please follow the steps below (for more information see [documentation for more information]):

After you've successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

In windows there will be a popup to install the following packages. Otherwise go to "In eclipse: Window -> Android SDK Manager" (if this gives problems when using windows you can also run it directly from the "SDK Manager.exe" right click on it and run as administrator):

Finally run the application in the emulator:


Common problems:


Blackberry


IOS

Common customizations

By default the application will ask user to enter the URL where Cyclos is running. To disable this feature and set a fixed URL you need to add the following line to properties.js file located under war/js folder

 hostUrl: "hereGoesYourUrl"

By default the session timeout will expire after 5 minutes without any activity. To change this value you need to add the following line to properties.js file located under war/js folder and set the desired time in seconds

 sessionTimeout: 250 

By default the application will display a splash screen if it is defined in Cyclos. This functionality can be enabled or disabled adding the following line to properties.js file located under war/js folder and setting the value to true (enables splash screen) or false (disables splash screen)

 splashScreen: false 

The application name can be changed in config.xml file under war folder editing the following line

 <name>HereGoesTheApplicationName</name>

Note: To change the application name set in the specific Android Project (cyclos3_mobile_android) edit the following line in strings.xml file located under res/values

 <string name="app_name">HereGoesTheApplicationName</string>

The application icon can be changed in config.xml file under war folder editing the following lines

 <icon src="icon.png" gap:role="default" />	
 <icon src="images/57.png" gap:platform="ios" width="57" height="57" />
 <icon src="images/72.png" gap:platform="ios" width="72" height="72" />
 <icon src="images/114.png" gap:platform="ios" width="114" height="114" />	
 <icon src="images/32.png" gap:platform="android" gap:density="ldpi" />
 <icon src="images/48.png" gap:platform="android" gap:density="mdpi" />
 <icon src="images/72.png" gap:platform="android" gap:density="hdpi" />
 <icon src="images/96.png" gap:platform="android" gap:density="xdpi" />	
 <icon src="images/114.png" gap:platform="blackberry" />	
 <icon src="images/64.png" gap:platform="winphone" />	
 <icon src="images/64.png" gap:platform="webos" />

Because of the multiple platform deployment there are many sizes of the same icon, the icon name corresponds with the icon size.

Note: To change the application icon set in the specific Android Project (cyclos3_mobile_android) replace the ic_launcher.png icon under drawable-hdpi, drawable-ldpi, drawable-mdpi and drawable-xhdpi folders.


Operations (previous)