diff options
| -rw-r--r-- | altosdroid/.classpath | 4 | ||||
| -rw-r--r-- | altosdroid/.gitignore | 1 | ||||
| -rw-r--r-- | altosdroid/AndroidManifest.xml | 17 | ||||
| -rw-r--r-- | altosdroid/Makefile.am | 37 | ||||
| -rw-r--r-- | altosdroid/project.properties | 3 | 
5 files changed, 50 insertions, 12 deletions
| diff --git a/altosdroid/.classpath b/altosdroid/.classpath index 0ca188f9..fce248e6 100644 --- a/altosdroid/.classpath +++ b/altosdroid/.classpath @@ -1,8 +1,10 @@  <?xml version="1.0" encoding="UTF-8"?>  <classpath>  	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> +	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>  	<classpathentry kind="src" path="src"/>  	<classpathentry kind="src" path="gen"/> -	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> +	<classpathentry kind="lib" path="libs/android-support-v4.jar"/> +	<classpathentry kind="lib" path="libs/altoslib_1.jar"/>  	<classpathentry kind="output" path="bin/classes"/>  </classpath> diff --git a/altosdroid/.gitignore b/altosdroid/.gitignore index 0d2ee6e0..56d0776d 100644 --- a/altosdroid/.gitignore +++ b/altosdroid/.gitignore @@ -2,4 +2,5 @@ local.properties  bin  gen  libs +google-play-services_lib  src/org/altusmetrum/AltosDroid/BuildInfo.java diff --git a/altosdroid/AndroidManifest.xml b/altosdroid/AndroidManifest.xml index adcfe94f..237c6dcf 100644 --- a/altosdroid/AndroidManifest.xml +++ b/altosdroid/AndroidManifest.xml @@ -20,9 +20,24 @@            android:versionCode="1"            android:versionName="1.1.9.3">      <uses-sdk android:targetSdkVersion="10" android:minSdkVersion="10"/> +    <!-- Google Maps --> +    <uses-feature android:glEsVersion="0x00020000" android:required="true"/> + +    <!-- Permissions needed to access bluetooth -->      <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />      <uses-permission android:name="android.permission.BLUETOOTH" /> +    <!-- Permissions needed to save Telemetry logs to SD card -->      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> +    <!-- Permissions needed for GoogleMaps --> +    <uses-permission android:name="android.permission.INTERNET"/> +    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> +    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> +    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> + +    <permission android:name="org.altusmetrum.AltosDroid.permission.MAPS_RECEIVE" +                android:protectionLevel="signature"/> +    <uses-permission android:name="org.altusmetrum.AltosDroid.permission.MAPS_RECEIVE"/> +      <application android:label="@string/app_name"                   android:icon="@drawable/app_icon" @@ -42,5 +57,7 @@          <service android:name=".TelemetryService" /> +        <meta-data android:name="com.google.android.maps.v2.API_KEY" +                   android:value="AIzaSyDSr6u4i9TJmVGhgGk4g0wUUhTy9FGyn0s"/>      </application>  </manifest> diff --git a/altosdroid/Makefile.am b/altosdroid/Makefile.am index 9ca24531..daa64963 100644 --- a/altosdroid/Makefile.am +++ b/altosdroid/Makefile.am @@ -1,12 +1,11 @@  if ANDROID -all_target=bin/AltosDroid-debug.apk bin/AltosDroid-release.apk -clean_command=ant clean +all_target=bin/AltosDroid-debug.apk bin/AltosDroid-release-unsigned.apk  else  all_target= -clean_command=echo done  endif  SDK=$(ANDROID_SDK) +SDK_TARGET=$(shell sed -ne 's/^target=//p' project.properties)  DX=$(SDK)/platform-tools/dx  ADB=$(SDK)/platform-tools/adb @@ -21,6 +20,14 @@ ALTOSLIB_JAR=altoslib_$(ALTOSLIB_VERSION).jar  ALTOSLIB=$(EXT_LIBDIR)/$(ALTOSLIB_JAR) +SUPPORT_V4_SRCDIR=$(SDK)/extras/android/support/v4 +SUPPORT_V4_JAR=android-support-v4.jar + +SUPPORT_V4=$(EXT_LIBDIR)/$(SUPPORT_V4_JAR) + +GOOGLE_PLAY_SERVICES_LIB_SRCDIR=$(SDK)/extras/google/google_play_services/libproject +GOOGLE_PLAY_SERVICES_LIB=google-play-services_lib +  SRC=$(SRC_DIR)/*.java  all: $(all_target) @@ -31,6 +38,13 @@ $(EXT_LIBDIR):  $(ALTOSLIB): $(EXT_LIBDIR) $(ALTOSLIB_SRCDIR)/$(ALTOSLIB_JAR)  	cd $(EXT_LIBDIR) && ln -sf $(shell echo $(EXT_LIBDIR) | sed 's|[^/]\+|..|g')/$(ALTOSLIB_SRCDIR)/$(ALTOSLIB_JAR) . +$(SUPPORT_V4): $(EXT_LIBDIR) $(SUPPORT_V4_SRCDIR)/$(SUPPORT_V4_JAR) +	cd $(EXT_LIBDIR) && ln -sf $(SUPPORT_V4_SRCDIR)/$(SUPPORT_V4_JAR) . + +$(GOOGLE_PLAY_SERVICES_LIB): $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SERVICES_LIB) +	cp -a $(GOOGLE_PLAY_SERVICES_LIB_SRCDIR)/$(GOOGLE_PLAY_SERVICES_LIB) . +	cd $(GOOGLE_PLAY_SERVICES_LIB) && $(SDK)/tools/android update project --target $(SDK_TARGET) --path . +  $(SRC_DIR)/BuildInfo.java: $(SRC)  	./buildinfo.sh @@ -41,10 +55,10 @@ install-release: bin/AltosDroid-release.apk  install-debug: bin/AltosDroid-debug.apk  	$(ADB) install -r bin/AltosDroid-debug.apk -bin/AltosDroid-debug.apk: $(SRC) $(ALTOSLIB) +bin/AltosDroid-debug.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICES_LIB)  	ant debug -bin/AltosDroid-release.apk: $(SRC) $(ALTOSLIB) +bin/AltosDroid-release-unsigned.apk: $(SRC) $(ALTOSLIB) $(SUPPORT_V4) $(GOOGLE_PLAY_SERVICES_LIB)  	ant release  sign: @@ -55,11 +69,14 @@ sign:  	   bin/AltosDroid-release-signed.apk \  	   bin/AltosDroid-release.apk -endif +clean: $(GOOGLE_PLAY_SERVICES_LIB) +	ant clean +	rm -rf $(EXT_LIBDIR) +	rm -rf $(GOOGLE_PLAY_SERVICES_LIB) -clean: clean-local -	$(clean_command) +else -clean-local: -	rm -rf $(EXT_LIBDIR) +clean: + +endif diff --git a/altosdroid/project.properties b/altosdroid/project.properties index 0a80e644..96b9551c 100644 --- a/altosdroid/project.properties +++ b/altosdroid/project.properties @@ -8,4 +8,5 @@  # project structure.  # Project target. -target=Google Inc.:Google APIs:10 +target=android-10 +android.library.reference.1=google-play-services_lib/ | 
