From ddbfa4f1e01a74f625a6a553f0261c6b2ad4fdd8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 31 Dec 2011 16:59:18 -0800 Subject: import --- .classpath | 7 + .project | 33 ++ .settings/org.eclipse.jdt.core.prefs | 5 + AndroidManifest.xml | 38 +++ Makefile | 30 ++ bin/AltosDroid.apk | Bin 0 -> 25740 bytes bin/classes.dex | Bin 0 -> 22564 bytes bin/resources.ap_ | Bin 0 -> 12887 bytes default.properties | 11 + gen/org/altusmetrum/AltosDroid/R.java | 66 ++++ keystore | Bin 0 -> 1270 bytes res/drawable-hdpi/app_icon.png | Bin 0 -> 5589 bytes res/drawable/app_icon.png | Bin 0 -> 4182 bytes res/layout/custom_title.xml | 39 +++ res/layout/device_list.xml | 56 ++++ res/layout/device_name.xml | 21 ++ res/layout/main.xml | 46 +++ res/layout/message.xml | 21 ++ res/menu/option_menu.xml | 26 ++ res/values/strings.xml | 41 +++ src/org/altusmetrum/AltosDroid/AltosDroid.java | 357 ++++++++++++++++++++ .../AltosDroid/BluetoothChatService.java | 370 +++++++++++++++++++++ .../altusmetrum/AltosDroid/DeviceListActivity.java | 203 +++++++++++ 23 files changed, 1370 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 AndroidManifest.xml create mode 100644 Makefile create mode 100644 bin/AltosDroid.apk create mode 100644 bin/classes.dex create mode 100644 bin/resources.ap_ create mode 100644 default.properties create mode 100644 gen/org/altusmetrum/AltosDroid/R.java create mode 100644 keystore create mode 100644 res/drawable-hdpi/app_icon.png create mode 100644 res/drawable/app_icon.png create mode 100644 res/layout/custom_title.xml create mode 100644 res/layout/device_list.xml create mode 100644 res/layout/device_name.xml create mode 100644 res/layout/main.xml create mode 100644 res/layout/message.xml create mode 100644 res/menu/option_menu.xml create mode 100644 res/values/strings.xml create mode 100644 src/org/altusmetrum/AltosDroid/AltosDroid.java create mode 100644 src/org/altusmetrum/AltosDroid/BluetoothChatService.java create mode 100644 src/org/altusmetrum/AltosDroid/DeviceListActivity.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..6efcbb7 --- /dev/null +++ b/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..7b56596 --- /dev/null +++ b/.project @@ -0,0 +1,33 @@ + + + AltosDroid + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e5d1cd3 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +#Wed Sep 28 19:51:24 NZDT 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/AndroidManifest.xml b/AndroidManifest.xml new file mode 100644 index 0000000..b72f038 --- /dev/null +++ b/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..577fe1b --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +SDK=/home/keithp/src/android/android-sdk-linux +DX=$(SDK)/platform-tools/dx +ADB=$(SDK)/platform-tools/adb +PLATFORM=$(SDK)/platforms/android-10 +TOOLS_LIB=$(SDK)/tools/lib +CLASSPATH=".:$(PLATFORM)/*:$(TOOLS_LIB)/*" +CLASSES=classes +CLASSPATH_ENV=mkdir $(CLASSES); CLASSPATH=$(CLASSPATH) +SRC_DIR=src/org/altusmetrum/AltosDroid +GEN_DIR=gen/org/altusmetrum/AltosDroid +JAVAC=javac +JAVACFLAGS=-d $(CLASSES) + +SRC=\ + $(SRC_DIR)/AltosDroid.java \ + $(SRC_DIR)/BluetoothChatService.java \ + $(SRC_DIR)/DeviceListActivity.java \ + $(GEN_DIR)/R.java + +all: class.stamp AltosDroid.apk + +class.stamp: $(SRC) + $(CLASSPATH_ENV) $(JAVAC) $(JAVACFLAGS) $(SRC) && touch class.stamp + +AltosDroid.apk: class.stamp + $(DX) --dex --verbose --output=$@ AndroidManifest.xml $(CLASSES) && \ + jarsigner -keystore ./keystore -storepass altusmetrum $@ bob + +install: AltosDroid.apk + $(ADB) -e install -r AltosDroid.apk diff --git a/bin/AltosDroid.apk b/bin/AltosDroid.apk new file mode 100644 index 0000000..56e7bb9 Binary files /dev/null and b/bin/AltosDroid.apk differ diff --git a/bin/classes.dex b/bin/classes.dex new file mode 100644 index 0000000..f53c2a0 Binary files /dev/null and b/bin/classes.dex differ diff --git a/bin/resources.ap_ b/bin/resources.ap_ new file mode 100644 index 0000000..cf01206 Binary files /dev/null and b/bin/resources.ap_ differ diff --git a/default.properties b/default.properties new file mode 100644 index 0000000..66db0d1 --- /dev/null +++ b/default.properties @@ -0,0 +1,11 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-10 diff --git a/gen/org/altusmetrum/AltosDroid/R.java b/gen/org/altusmetrum/AltosDroid/R.java new file mode 100644 index 0000000..66f3449 --- /dev/null +++ b/gen/org/altusmetrum/AltosDroid/R.java @@ -0,0 +1,66 @@ +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package org.altusmetrum.AltosDroid; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int app_icon=0x7f020000; + } + public static final class id { + public static final int button_scan=0x7f060006; + public static final int button_send=0x7f060009; + public static final int discoverable=0x7f06000c; + public static final int edit_text_out=0x7f060008; + public static final int in=0x7f060007; + public static final int insecure_connect_scan=0x7f06000b; + public static final int new_devices=0x7f060005; + public static final int paired_devices=0x7f060003; + public static final int secure_connect_scan=0x7f06000a; + public static final int title_left_text=0x7f060000; + public static final int title_new_devices=0x7f060004; + public static final int title_paired_devices=0x7f060002; + public static final int title_right_text=0x7f060001; + } + public static final class layout { + public static final int custom_title=0x7f030000; + public static final int device_list=0x7f030001; + public static final int device_name=0x7f030002; + public static final int main=0x7f030003; + public static final int message=0x7f030004; + } + public static final class menu { + public static final int option_menu=0x7f050000; + } + public static final class string { + public static final int app_name=0x7f040000; + public static final int bt_not_enabled_leaving=0x7f040003; + public static final int button_scan=0x7f04000d; + public static final int discoverable=0x7f040010; + public static final int insecure_connect=0x7f04000f; + public static final int none_found=0x7f04000a; + public static final int none_paired=0x7f040009; + public static final int not_connected=0x7f040002; + /** DeviceListActivity + */ + public static final int scanning=0x7f040007; + /** Options Menu + */ + public static final int secure_connect=0x7f04000e; + public static final int select_device=0x7f040008; + /** BluetoothChat + */ + public static final int send=0x7f040001; + public static final int title_connected_to=0x7f040005; + public static final int title_connecting=0x7f040004; + public static final int title_not_connected=0x7f040006; + public static final int title_other_devices=0x7f04000c; + public static final int title_paired_devices=0x7f04000b; + } +} diff --git a/keystore b/keystore new file mode 100644 index 0000000..00739d0 Binary files /dev/null and b/keystore differ diff --git a/res/drawable-hdpi/app_icon.png b/res/drawable-hdpi/app_icon.png new file mode 100644 index 0000000..8836ff6 Binary files /dev/null and b/res/drawable-hdpi/app_icon.png differ diff --git a/res/drawable/app_icon.png b/res/drawable/app_icon.png new file mode 100644 index 0000000..d3e09a5 Binary files /dev/null and b/res/drawable/app_icon.png differ diff --git a/res/layout/custom_title.xml b/res/layout/custom_title.xml new file mode 100644 index 0000000..57eb6b4 --- /dev/null +++ b/res/layout/custom_title.xml @@ -0,0 +1,39 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/device_list.xml b/res/layout/device_list.xml new file mode 100644 index 0000000..395695f --- /dev/null +++ b/res/layout/device_list.xml @@ -0,0 +1,56 @@ + + + + + + + +