Skip to end of metadata
Go to start of metadata

 

To make use of the Ant Tasks, unzip the antlibs folder from the antlibs zip and place it in the RAMP project.

Upload Feature Ant Task

The upload feature ant task allows one to upload a feature to a feature server without having to do it manually from Eclipse.

To use it, create an upload.xml file in the RAMP project with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<project name="example" default="uploadfeature">

	<taskdef name="uploadfeature"
		classname="com.vmt.deployment.UploadFeatureTask"
		classpath="antlibs/ramp-ant-tasks.jar" />

	<target name="uploadfeature">
		<uploadfeature
			endpoint = "https://admin.ramp.virtualmobiletech.com/d/webservices/"
			username = "admin"
			password = "password"
			companyId = "vmt"
			appId = "test"
			baseDir = "${basedir}"/>
	</target>

</project>

One can then update the parameters as desired.

Create App Ant Task

The create app ant task allows one to create new builds of an app without having to use the RAMP Deployment Platform. It also adds some features not available on the Deployment Platform, e.g. specifying the version of the source code to build against, specifying Android icons to use on specific DPI screens and editing the Android manifest.

To use it, create a build.xml file in the RAMP project with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<project name="example" default="createapp">

	<taskdef name="createapp"
		classname="com.vmt.deployment.CreateAppTask"
		classpath="antlibs/ramp-ant-tasks.jar" />

	<target name="createapp">
		<createapp 
			appId = "test"
			description = "Test app"
			companyName = "vmt"
			productionBuilds = "true"
			featureServerUrl = "http://localhost:8080/ramp/ramp/feature/ft"
			featureServerKey = "d8b5e5c20075fd43cc257e4ef721fcbd00aef5633f0e5368c0f95aa6019af509527d9a7e454742f167ebe4afc439e5d4c82a0c4e12203d21f915f380ce415fe4d192c6eb6dffef7b9c753b9a6e32ad09c77c28defae66181978e307105ce85838b6943466a1523caf52eec4d67a31ef05eac3b69a6ef27c83eacf38c8d4dd4c1"
			serviceServerUrl = "http://localhost:8080/ramp"
			serviceServerKey = "c6f3541a4f7c4db7b449db8042be4b2b5f653b0bc53dabd5b3e84b3063c02ef2ce314a52398ada8b0dabab2ce18cc55889359ecaa8d8e7be01c3ca51e327a789c4aeda73523c81bc4d1c73eebeffdff95b5ccbf208a235239dc64e46fc7be6c701c1380a2d17ae295c921c90408776c1e5eb763958893ff4b4252556e8594cad"
			serviceServerKeyName = "keyexchange"
			vmConfigCompany = "vmt"
			vmConfigName = "default"
			vmConfigVersion = "1.0" 
			vmSource = "5.0.0"
			deploymentPlatformUrl = "https://admin.ramp.virtualmobiletech.com/d/webservices/"
			username = "email@example.com"
			password = "password"
			archiveFolder = "archive"/>
	</target>

</project>

Then create a folder named "archive" as detailed below.

The archive folder

The archive folder contains all resources necessary for building. Here is a simple example of the archive folder.

Feature phone images

The featurephones folder contains a 44x44 icon.png.

Android images

The android folder contains various subfolders which allow one to include different resolution images to use with different DPI screens of devices running Android. The example includes a very basic configuration as follows:

Folder nameicon.png resolution
medium-dpi48x48

A configuration which would better support a wide variety of screens would be:

Folder nameicon.png resolution
high-dpi72x72
low-dpi36x36
medium-dpi48x48
xhigh-dpi96x96

The following links contain more information about using alternative resources to better support a wide range of screens on Android:

http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

http://developer.android.com/guide/practices/screens_support.html

The Android Manifest

The android folder also includes a TemplateAndroidManifest.stg file, which is a String Template Group file used to specify the structure of the AndroidManifest.xml file. 

Useful changes to this file include the android:versionCode and the android:versionName

The android:versionCode needs to be increased by 1 every time a new build is submitted to the Google Play store.

The android:versionName is the version which is displayed when viewing the app's details on a device. It is generally kept in sync with the RAMP VM version, but can be set to anything one desires.

Using the Android Google Maps API

Here is another example of an archive folder, which includes changes required for supporting the Android Google Maps API.

The android folder contains a sign folder which includes signing keys required for using the Android Google Maps API.

The TemplateAndroidManifest.stg file includes the following line:

\<uses-library android:name="com.google.android.maps"/\>

which indicates that the app needs to make use of the Android Google Maps API.

The following line should be included if the app also makes use of the VMT Embedded Maps Plug-in:

\<activity android:name="com.vmt.android.maps.MapsActivityandroid:label="MapViewandroid:theme="@android:style/Theme.NoTitleBar"/\>

Parameters

The parameters are mostly self-explanatory, and correspond to the parameters on the Deployment Platform. Parameters that are unique to the ant task are vmSource and archiveFolder.

The vmSource parameter indicates which version of the source code to build the VMs against. This can be set to an exact version like "4.4.0", or "trunk" to build against the very latest source, or "snapshot" to build against the last stable source.

The archiveFolder parameter allows one to set which folder the ant task should look in to find the required resources for building, e.g. icons etc.

  • No labels