From: Keith Packard Date: Thu, 23 Feb 2012 03:37:24 +0000 (+1300) Subject: Demonstrate using AltosLib from altosdroid X-Git-Tag: 1.0.9.6~96 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=9b659904109f992b8a3e61efb94e81cdb19af1c9 Demonstrate using AltosLib from altosdroid Get things hooked up so that we can use AltosLib functions from the android application; it's a bit of a hack at present, but appears to work. Some more 'official' technique would be nice... Signed-off-by: Keith Packard --- diff --git a/altosdroid/.classpath b/altosdroid/.classpath index 6efcbb73..d260cafa 100644 --- a/altosdroid/.classpath +++ b/altosdroid/.classpath @@ -1,6 +1,7 @@ + diff --git a/altosdroid/Makefile.am b/altosdroid/Makefile.am index 2c6ffc2c..557a5722 100644 --- a/altosdroid/Makefile.am +++ b/altosdroid/Makefile.am @@ -23,6 +23,12 @@ SRC=\ all: $(all_target) +ALTOSLIB=bin/classes/AltosLib.jar + +$(ALTOSLIB): + mkdir -p bin/classes + cd bin/classes && ln -s ../../../altoslib/AltosLib.jar . + if ANDROID install-release: bin/AltosDroid-release.apk $(ADB) install -r bin/AltosDroid-release.apk @@ -30,10 +36,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) +bin/AltosDroid-debug.apk: $(SRC) $(ALTOSLIB) ant debug -bin/AltosDroid-release.apk: $(SRC) +bin/AltosDroid-release.apk: $(SRC) $(ALTOSLIB) ant release endif diff --git a/altosdroid/local.properties.in b/altosdroid/local.properties.in index 14df0494..543ce208 100644 --- a/altosdroid/local.properties.in +++ b/altosdroid/local.properties.in @@ -8,3 +8,4 @@ # For customization when using a Version Control System, please read the # header note. sdk.dir=@ANDROID_SDK@ +extensible.libs.classpath=../altoslib diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index 844ca39e..87f89cf9 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java @@ -39,6 +39,7 @@ import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import org.altusmetrum.AltosDroid.R; +import org.altusmetrum.AltosLib.*; /** * This is the main Activity that displays the current chat session. @@ -48,6 +49,8 @@ public class AltosDroid extends Activity { private static final String TAG = "BluetoothChat"; private static final boolean D = true; + private static final AltosLine q = new AltosLine(); + // Message types sent from the BluetoothChatService Handler public static final int MESSAGE_STATE_CHANGE = 1; public static final int MESSAGE_READ = 2;