diff --git a/library/.classpath b/library/.classpath
new file mode 100644
index 0000000..7bc01d9
--- /dev/null
+++ b/library/.classpath
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/library/.gitignore b/library/.gitignore
new file mode 100644
index 0000000..47ab45a
--- /dev/null
+++ b/library/.gitignore
@@ -0,0 +1,6 @@
+/bin
+/gen
+local.properties
+.idea/
+lint.xml
+/.apt_generated
diff --git a/library/.project b/library/.project
new file mode 100644
index 0000000..db0e780
--- /dev/null
+++ b/library/.project
@@ -0,0 +1,33 @@
+
+
+ Bluetooth LE Library
+
+
+
+
+
+ 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/library/.settings/org.eclipse.jdt.core.prefs b/library/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b080d2d
--- /dev/null
+++ b/library/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/library/AndroidManifest.xml b/library/AndroidManifest.xml
new file mode 100644
index 0000000..0771641
--- /dev/null
+++ b/library/AndroidManifest.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
diff --git a/library/ic_launcher-web.png b/library/ic_launcher-web.png
new file mode 100644
index 0000000..baf0bd7
Binary files /dev/null and b/library/ic_launcher-web.png differ
diff --git a/libs/android-support-v4.jar b/library/libs/android-support-v4.jar
similarity index 100%
rename from libs/android-support-v4.jar
rename to library/libs/android-support-v4.jar
diff --git a/proguard-project.txt b/library/proguard-project.txt
similarity index 100%
rename from proguard-project.txt
rename to library/proguard-project.txt
diff --git a/library/project.properties b/library/project.properties
new file mode 100644
index 0000000..91d2b02
--- /dev/null
+++ b/library/project.properties
@@ -0,0 +1,15 @@
+# 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 edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-19
+android.library=true
diff --git a/library/res/drawable-hdpi/ic_launcher.png b/library/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..7fe8ce8
Binary files /dev/null and b/library/res/drawable-hdpi/ic_launcher.png differ
diff --git a/library/res/drawable-mdpi/ic_launcher.png b/library/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..81ca4ca
Binary files /dev/null and b/library/res/drawable-mdpi/ic_launcher.png differ
diff --git a/library/res/drawable-xhdpi/ic_launcher.png b/library/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..8e4b1c6
Binary files /dev/null and b/library/res/drawable-xhdpi/ic_launcher.png differ
diff --git a/library/res/drawable-xxhdpi/ic_launcher.png b/library/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..ed2d393
Binary files /dev/null and b/library/res/drawable-xxhdpi/ic_launcher.png differ
diff --git a/res/values-v11/styles.xml b/library/res/values-v11/styles.xml
similarity index 100%
rename from res/values-v11/styles.xml
rename to library/res/values-v11/styles.xml
diff --git a/res/values-v14/styles.xml b/library/res/values-v14/styles.xml
similarity index 100%
rename from res/values-v14/styles.xml
rename to library/res/values-v14/styles.xml
diff --git a/library/res/values/strings.xml b/library/res/values/strings.xml
new file mode 100644
index 0000000..666f295
--- /dev/null
+++ b/library/res/values/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Bluetooth LE Library
+
+
diff --git a/res/values/styles.xml b/library/res/values/styles.xml
similarity index 100%
rename from res/values/styles.xml
rename to library/res/values/styles.xml
diff --git a/src/uk/co/alt236/btlescan/containers/BluetoothLeDevice.java b/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java
similarity index 97%
rename from src/uk/co/alt236/btlescan/containers/BluetoothLeDevice.java
rename to library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java
index 21fda20..0aca981 100644
--- a/src/uk/co/alt236/btlescan/containers/BluetoothLeDevice.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/device/BluetoothLeDevice.java
@@ -1,9 +1,10 @@
-package uk.co.alt236.btlescan.containers;
+package uk.co.alt236.bluetoothlelib.device;
import java.util.Arrays;
-import uk.co.alt236.btlescan.util.AdRecordUtils;
-import uk.co.alt236.btlescan.util.ByteUtils;
+import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecordStore;
+import uk.co.alt236.bluetoothlelib.util.AdRecordUtils;
+import uk.co.alt236.bluetoothlelib.util.ByteUtils;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.os.Bundle;
diff --git a/src/uk/co/alt236/btlescan/containers/AdRecord.java b/library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecord.java
similarity index 99%
rename from src/uk/co/alt236/btlescan/containers/AdRecord.java
rename to library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecord.java
index d81cfc1..ac8cc0c 100644
--- a/src/uk/co/alt236/btlescan/containers/AdRecord.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecord.java
@@ -1,4 +1,4 @@
-package uk.co.alt236.btlescan.containers;
+package uk.co.alt236.bluetoothlelib.device.adrecord;
import java.util.Arrays;
import android.os.Bundle;
diff --git a/src/uk/co/alt236/btlescan/containers/AdRecordStore.java b/library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecordStore.java
similarity index 96%
rename from src/uk/co/alt236/btlescan/containers/AdRecordStore.java
rename to library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecordStore.java
index ed11af1..bf686ab 100644
--- a/src/uk/co/alt236/btlescan/containers/AdRecordStore.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/device/adrecord/AdRecordStore.java
@@ -1,10 +1,10 @@
-package uk.co.alt236.btlescan.containers;
+package uk.co.alt236.bluetoothlelib.device.adrecord;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
-import uk.co.alt236.btlescan.util.AdRecordUtils;
+import uk.co.alt236.bluetoothlelib.util.AdRecordUtils;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/src/uk/co/alt236/btlescan/containers/ManufacturerDataIBeacon.java b/library/src/uk/co/alt236/bluetoothlelib/device/mfdata/IBeaconManufacturerData.java
similarity index 86%
rename from src/uk/co/alt236/btlescan/containers/ManufacturerDataIBeacon.java
rename to library/src/uk/co/alt236/bluetoothlelib/device/mfdata/IBeaconManufacturerData.java
index 35b9451..443b356 100644
--- a/src/uk/co/alt236/btlescan/containers/ManufacturerDataIBeacon.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/device/mfdata/IBeaconManufacturerData.java
@@ -1,12 +1,14 @@
-package uk.co.alt236.btlescan.containers;
+package uk.co.alt236.bluetoothlelib.device.mfdata;
import java.util.Arrays;
import java.util.UUID;
-import uk.co.alt236.btlescan.util.ByteUtils;
+import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
+import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecord;
+import uk.co.alt236.bluetoothlelib.util.ByteUtils;
import android.util.Log;
-public final class ManufacturerDataIBeacon {
+public final class IBeaconManufacturerData {
// 0 4C # Byte 1 (LSB) of Company identifier code
// 1 00 # Byte 0 (MSB) of Company identifier code (0x004C == Apple)
// 2 02 # Byte 0 of iBeacon advertisement indicator
@@ -41,11 +43,11 @@ public final class ManufacturerDataIBeacon {
private final int mMinor;
private final UUID mUUID;
- public ManufacturerDataIBeacon(BluetoothLeDevice device){
+ public IBeaconManufacturerData(BluetoothLeDevice device){
this(device.getAdRecordStore().getRecord(AdRecord.TYPE_MANUFACTURER_SPECIFIC_DATA).getData());
}
- public ManufacturerDataIBeacon(byte[] data){
+ public IBeaconManufacturerData(byte[] data){
mData = data;
Log.d("TAG", "~ Reading iBeacon Data: " + ByteUtils.byteArrayToHexString(data));
diff --git a/src/uk/co/alt236/btlescan/util/AdRecordUtils.java b/library/src/uk/co/alt236/bluetoothlelib/util/AdRecordUtils.java
similarity index 96%
rename from src/uk/co/alt236/btlescan/util/AdRecordUtils.java
rename to library/src/uk/co/alt236/bluetoothlelib/util/AdRecordUtils.java
index 95c219c..2509751 100644
--- a/src/uk/co/alt236/btlescan/util/AdRecordUtils.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/util/AdRecordUtils.java
@@ -1,4 +1,4 @@
-package uk.co.alt236.btlescan.util;
+package uk.co.alt236.bluetoothlelib.util;
import java.util.ArrayList;
import java.util.Arrays;
@@ -7,7 +7,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import uk.co.alt236.btlescan.containers.AdRecord;
+import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecord;
import android.annotation.SuppressLint;
import android.util.SparseArray;
diff --git a/src/uk/co/alt236/btlescan/util/ByteUtils.java b/library/src/uk/co/alt236/bluetoothlelib/util/ByteUtils.java
similarity index 97%
rename from src/uk/co/alt236/btlescan/util/ByteUtils.java
rename to library/src/uk/co/alt236/bluetoothlelib/util/ByteUtils.java
index 0a7828f..976ee6f 100644
--- a/src/uk/co/alt236/btlescan/util/ByteUtils.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/util/ByteUtils.java
@@ -1,4 +1,4 @@
-package uk.co.alt236.btlescan.util;
+package uk.co.alt236.bluetoothlelib.util;
import java.nio.ByteBuffer;
diff --git a/src/uk/co/alt236/btlescan/util/IBeaconUtils.java b/library/src/uk/co/alt236/bluetoothlelib/util/IBeaconUtils.java
similarity index 89%
rename from src/uk/co/alt236/btlescan/util/IBeaconUtils.java
rename to library/src/uk/co/alt236/bluetoothlelib/util/IBeaconUtils.java
index 26750a9..1161172 100644
--- a/src/uk/co/alt236/btlescan/util/IBeaconUtils.java
+++ b/library/src/uk/co/alt236/bluetoothlelib/util/IBeaconUtils.java
@@ -1,6 +1,6 @@
-package uk.co.alt236.btlescan.util;
+package uk.co.alt236.bluetoothlelib.util;
-import uk.co.alt236.btlescan.containers.BluetoothLeDevice;
+import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
public class IBeaconUtils {
private static final byte[] SCAN_RECORD_PREFIX_IBEACON_1 = new byte[]{0x02, 0x01, 0x1A, 0x1A, (byte) 0xFF, 0x4C, 0x00, 0x02, 0x15};
diff --git a/.classpath b/sample_app/.classpath
similarity index 100%
rename from .classpath
rename to sample_app/.classpath
diff --git a/.factorypath b/sample_app/.factorypath
similarity index 100%
rename from .factorypath
rename to sample_app/.factorypath
diff --git a/sample_app/.gitignore b/sample_app/.gitignore
new file mode 100644
index 0000000..47ab45a
--- /dev/null
+++ b/sample_app/.gitignore
@@ -0,0 +1,6 @@
+/bin
+/gen
+local.properties
+.idea/
+lint.xml
+/.apt_generated
diff --git a/.project b/sample_app/.project
similarity index 100%
rename from .project
rename to sample_app/.project
diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/sample_app/.settings/org.eclipse.jdt.apt.core.prefs
similarity index 100%
rename from .settings/org.eclipse.jdt.apt.core.prefs
rename to sample_app/.settings/org.eclipse.jdt.apt.core.prefs
diff --git a/.settings/org.eclipse.jdt.core.prefs b/sample_app/.settings/org.eclipse.jdt.core.prefs
similarity index 100%
rename from .settings/org.eclipse.jdt.core.prefs
rename to sample_app/.settings/org.eclipse.jdt.core.prefs
diff --git a/AndroidManifest.xml b/sample_app/AndroidManifest.xml
similarity index 100%
rename from AndroidManifest.xml
rename to sample_app/AndroidManifest.xml
diff --git a/ic_launcher-web.png b/sample_app/ic_launcher-web.png
similarity index 100%
rename from ic_launcher-web.png
rename to sample_app/ic_launcher-web.png
diff --git a/sample_app/libs/android-support-v4.jar b/sample_app/libs/android-support-v4.jar
new file mode 100644
index 0000000..96644ed
Binary files /dev/null and b/sample_app/libs/android-support-v4.jar differ
diff --git a/libs/butterknife-4.0.1.jar b/sample_app/libs/butterknife-4.0.1.jar
similarity index 100%
rename from libs/butterknife-4.0.1.jar
rename to sample_app/libs/butterknife-4.0.1.jar
diff --git a/sample_app/proguard-project.txt b/sample_app/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/sample_app/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/project.properties b/sample_app/project.properties
similarity index 93%
rename from project.properties
rename to sample_app/project.properties
index d5ad9f8..3a06472 100644
--- a/project.properties
+++ b/sample_app/project.properties
@@ -12,3 +12,4 @@
# Project target.
target=Google Inc.:Google APIs:19
+android.library.reference.1=../library
diff --git a/res/drawable-hdpi/ic_launcher.png b/sample_app/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-hdpi/ic_launcher.png
rename to sample_app/res/drawable-hdpi/ic_launcher.png
diff --git a/res/drawable-mdpi/ic_launcher.png b/sample_app/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-mdpi/ic_launcher.png
rename to sample_app/res/drawable-mdpi/ic_launcher.png
diff --git a/res/drawable-xhdpi/ic_bluetooth.png b/sample_app/res/drawable-xhdpi/ic_bluetooth.png
similarity index 100%
rename from res/drawable-xhdpi/ic_bluetooth.png
rename to sample_app/res/drawable-xhdpi/ic_bluetooth.png
diff --git a/res/drawable-xhdpi/ic_bluetooth_ibeacon.png b/sample_app/res/drawable-xhdpi/ic_bluetooth_ibeacon.png
similarity index 100%
rename from res/drawable-xhdpi/ic_bluetooth_ibeacon.png
rename to sample_app/res/drawable-xhdpi/ic_bluetooth_ibeacon.png
diff --git a/res/drawable-xhdpi/ic_launcher.png b/sample_app/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xhdpi/ic_launcher.png
rename to sample_app/res/drawable-xhdpi/ic_launcher.png
diff --git a/res/drawable-xxhdpi/ic_launcher.png b/sample_app/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from res/drawable-xxhdpi/ic_launcher.png
rename to sample_app/res/drawable-xxhdpi/ic_launcher.png
diff --git a/res/layout/actionbar_progress_indeterminate.xml b/sample_app/res/layout/actionbar_progress_indeterminate.xml
similarity index 100%
rename from res/layout/actionbar_progress_indeterminate.xml
rename to sample_app/res/layout/actionbar_progress_indeterminate.xml
diff --git a/res/layout/activity_details.xml b/sample_app/res/layout/activity_details.xml
similarity index 100%
rename from res/layout/activity_details.xml
rename to sample_app/res/layout/activity_details.xml
diff --git a/res/layout/activity_main.xml b/sample_app/res/layout/activity_main.xml
similarity index 100%
rename from res/layout/activity_main.xml
rename to sample_app/res/layout/activity_main.xml
diff --git a/res/layout/list_item_device.xml b/sample_app/res/layout/list_item_device.xml
similarity index 100%
rename from res/layout/list_item_device.xml
rename to sample_app/res/layout/list_item_device.xml
diff --git a/res/menu/main.xml b/sample_app/res/menu/main.xml
similarity index 100%
rename from res/menu/main.xml
rename to sample_app/res/menu/main.xml
diff --git a/res/values-sw600dp/dimens.xml b/sample_app/res/values-sw600dp/dimens.xml
similarity index 100%
rename from res/values-sw600dp/dimens.xml
rename to sample_app/res/values-sw600dp/dimens.xml
diff --git a/res/values-sw720dp-land/dimens.xml b/sample_app/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from res/values-sw720dp-land/dimens.xml
rename to sample_app/res/values-sw720dp-land/dimens.xml
diff --git a/sample_app/res/values-v11/styles.xml b/sample_app/res/values-v11/styles.xml
new file mode 100644
index 0000000..3c02242
--- /dev/null
+++ b/sample_app/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/sample_app/res/values-v14/styles.xml b/sample_app/res/values-v14/styles.xml
new file mode 100644
index 0000000..a91fd03
--- /dev/null
+++ b/sample_app/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/res/values/dimens.xml b/sample_app/res/values/dimens.xml
similarity index 100%
rename from res/values/dimens.xml
rename to sample_app/res/values/dimens.xml
diff --git a/res/values/strings.xml b/sample_app/res/values/strings.xml
similarity index 100%
rename from res/values/strings.xml
rename to sample_app/res/values/strings.xml
diff --git a/sample_app/res/values/styles.xml b/sample_app/res/values/styles.xml
new file mode 100644
index 0000000..6ce89c7
--- /dev/null
+++ b/sample_app/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/uk/co/alt236/btlescan/activities/DetailsActivity.java b/sample_app/src/uk/co/alt236/btlescan/activities/DetailsActivity.java
similarity index 82%
rename from src/uk/co/alt236/btlescan/activities/DetailsActivity.java
rename to sample_app/src/uk/co/alt236/btlescan/activities/DetailsActivity.java
index c88d2aa..ac4df26 100644
--- a/src/uk/co/alt236/btlescan/activities/DetailsActivity.java
+++ b/sample_app/src/uk/co/alt236/btlescan/activities/DetailsActivity.java
@@ -2,13 +2,13 @@ package uk.co.alt236.btlescan.activities;
import java.util.Collection;
+import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
+import uk.co.alt236.bluetoothlelib.device.adrecord.AdRecord;
+import uk.co.alt236.bluetoothlelib.device.mfdata.IBeaconManufacturerData;
+import uk.co.alt236.bluetoothlelib.util.AdRecordUtils;
+import uk.co.alt236.bluetoothlelib.util.ByteUtils;
+import uk.co.alt236.bluetoothlelib.util.IBeaconUtils;
import uk.co.alt236.btlescan.R;
-import uk.co.alt236.btlescan.containers.AdRecord;
-import uk.co.alt236.btlescan.containers.BluetoothLeDevice;
-import uk.co.alt236.btlescan.containers.ManufacturerDataIBeacon;
-import uk.co.alt236.btlescan.util.AdRecordUtils;
-import uk.co.alt236.btlescan.util.ByteUtils;
-import uk.co.alt236.btlescan.util.IBeaconUtils;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
@@ -70,7 +70,7 @@ public class DetailsActivity extends Activity{
append(sb, "Is iBeacon", isIBeacon);
if(isIBeacon){
- final ManufacturerDataIBeacon iBeaconData = new ManufacturerDataIBeacon(device);
+ final IBeaconManufacturerData iBeaconData = new IBeaconManufacturerData(device);
append(sb, "Company ID", iBeaconData.getCompanyIdentifier() + " (" + Integer.toHexString( iBeaconData.getCompanyIdentifier() ) + ")");
append(sb, "iBeacon Advertisment", iBeaconData.getIBeaconAdvertisement() + " (" + Integer.toHexString( iBeaconData.getIBeaconAdvertisement() ) + ")");
append(sb, "UUID", iBeaconData.getUUID().toString());
@@ -83,22 +83,22 @@ public class DetailsActivity extends Activity{
mTvDetails.setText(sb.toString());
}
- private void append(StringBuilder sb, String label, boolean value) {
- append(sb, label, String.valueOf(value));
- }
-
- private void append(StringBuilder sb, String label, int value) {
- append(sb, label, String.valueOf(value));
- }
-
- private void append(StringBuilder sb, String label, long value) {
- append(sb, label, String.valueOf(value));
- }
-
private static void append(StringBuilder sb, byte[] value){
append(sb, ByteUtils.byteArrayToHexString(value), null);
}
+ private static void append(StringBuilder sb, String label, boolean value) {
+ append(sb, label, String.valueOf(value));
+ }
+
+ private static void append(StringBuilder sb, String label, int value) {
+ append(sb, label, String.valueOf(value));
+ }
+
+ private static void append(StringBuilder sb, String label, long value) {
+ append(sb, label, String.valueOf(value));
+ }
+
private static void append(StringBuilder sb, String label, String value){
if(value != null){
sb.append("\u2022" + label +":\t" + value + "\n");
diff --git a/src/uk/co/alt236/btlescan/activities/MainActivity.java b/sample_app/src/uk/co/alt236/btlescan/activities/MainActivity.java
similarity index 98%
rename from src/uk/co/alt236/btlescan/activities/MainActivity.java
rename to sample_app/src/uk/co/alt236/btlescan/activities/MainActivity.java
index cdff0ad..568cdee 100644
--- a/src/uk/co/alt236/btlescan/activities/MainActivity.java
+++ b/sample_app/src/uk/co/alt236/btlescan/activities/MainActivity.java
@@ -1,8 +1,8 @@
package uk.co.alt236.btlescan.activities;
+import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
import uk.co.alt236.btlescan.R;
import uk.co.alt236.btlescan.adapters.LeDeviceListAdapter;
-import uk.co.alt236.btlescan.containers.BluetoothLeDevice;
import uk.co.alt236.btlescan.util.BluetoothLeScanner;
import uk.co.alt236.btlescan.util.BluetoothUtils;
import android.app.ListActivity;
diff --git a/src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java b/sample_app/src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java
similarity index 96%
rename from src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java
rename to sample_app/src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java
index 9e8e043..913f2b4 100644
--- a/src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java
+++ b/sample_app/src/uk/co/alt236/btlescan/adapters/LeDeviceListAdapter.java
@@ -3,9 +3,9 @@ package uk.co.alt236.btlescan.adapters;
import java.util.ArrayList;
import java.util.List;
+import uk.co.alt236.bluetoothlelib.device.BluetoothLeDevice;
+import uk.co.alt236.bluetoothlelib.util.IBeaconUtils;
import uk.co.alt236.btlescan.R;
-import uk.co.alt236.btlescan.containers.BluetoothLeDevice;
-import uk.co.alt236.btlescan.util.IBeaconUtils;
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/src/uk/co/alt236/btlescan/util/BluetoothLeScanner.java b/sample_app/src/uk/co/alt236/btlescan/util/BluetoothLeScanner.java
similarity index 100%
rename from src/uk/co/alt236/btlescan/util/BluetoothLeScanner.java
rename to sample_app/src/uk/co/alt236/btlescan/util/BluetoothLeScanner.java
diff --git a/src/uk/co/alt236/btlescan/util/BluetoothUtils.java b/sample_app/src/uk/co/alt236/btlescan/util/BluetoothUtils.java
similarity index 100%
rename from src/uk/co/alt236/btlescan/util/BluetoothUtils.java
rename to sample_app/src/uk/co/alt236/btlescan/util/BluetoothUtils.java