Skip to content
Adam St. John edited this page Jun 6, 2014 · 1 revision

Changes Required By Sitata for Testing

1. Build Path

Change the build path of some libraries to match your local setup. This can be done quickly by editing the .classpath file. Here's what I needed to match my osx setup:

<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="build/.apt_generated"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="lib" path="/usr/local/var/lib/android-sdk/platforms/android-10/android.jar"/>
	<classpathentry kind="lib" path="/usr/local/var/lib/android-sdk/add-ons/addon-google_apis-google-10/libs/maps.jar"/>
	<classpathentry kind="lib" path="/usr/local/var/lib/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar"/>
	<classpathentry kind="lib" path="/Users/astjohn/Library/Application Support/Titanium/mobilesdk/osx/3.2.3.GA/android/titanium.jar"/>
	<classpathentry kind="lib" path="/Users/astjohn/Library/Application Support/Titanium/mobilesdk/osx/3.2.3.GA/android/kroll-common.jar"/>
	<classpathentry kind="lib" path="/Users/astjohn/Library/Application Support/Titanium/mobilesdk/osx/3.2.3.GA/android/kroll-apt.jar"/>
	<classpathentry kind="lib" path="/Users/astjohn/Library/Application Support/Titanium/mobilesdk/osx/3.2.3.GA/android/android-support-v4.jar"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

2. Changes to timodule.xml

I had to add a few permissions such as Internet and a custom map API key (belonging to Sitata and the developers keystore). Here is my current timodule.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<ti:module xmlns:ti="http://ti.appcelerator.org" xmlns:android="http://schemas.android.com/apk/res/android">
	<!--
		Similar to tiapp.xml, but contains module/platform specific
		configuration in <iphone>, <android>, and <mobileweb> sections
	-->
	<iphone>
	</iphone>
	<android xmlns:android="http://schemas.android.com/apk/res/android">
            <manifest>
               <uses-feature android:glEsVersion="0x00020000" android:required="true"/>

               <uses-permission android:name="android.permission.INTERNET"/>
               <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

               <permission android:name="${tiapp.properties['id']}.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
               <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
               <uses-permission android:name="${tiapp.properties['id']}.permission.MAPS_RECEIVE"/>
               <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
               <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
               <application android:debuggable="true">
                  <meta-data
 	                 android:name="com.google.android.gms.version"
 	                 android:value="4132500"/>

                   <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCBOTEEvCctObBgoiQykYwpvpBH6V2rF30" />
               </application>
            </manifest>

	</android>
	<mobileweb>
	</mobileweb>
</ti:module>

3. Be careful on the commits

I did not check in the changes to the files above as they are too specific to the local setup. Perhaps they shouldn't be included in the repo...