First cut.
Change-Id: I69355c99f3ebcce4f7a165d25fca53bdd62fb691
diff --git a/android-lib/build.gradle b/android-lib/build.gradle
index d4397b1..3d44a02 100644
--- a/android-lib/build.gradle
+++ b/android-lib/build.gradle
@@ -15,8 +15,8 @@
apply plugin: 'wrapper'
android {
- buildToolsVersion '21.1.2'
- compileSdkVersion 19
+ buildToolsVersion '22.0.1'
+ compileSdkVersion 22
defaultConfig {
minSdkVersion 19
@@ -41,7 +41,7 @@
androidTestCompile 'com.google.truth:truth:0.25'
// This dependency exists only to work around an issue in the sdkmanager plugin v0.12.0. This
// should be fixed when http://git.io/vIXec is checked in and a release is made.
- androidTestCompile('com.android.support:support-v4:21.0.0')
+ androidTestCompile 'com.android.support:support-v4:21.0.0'
androidTestCompile('com.android.support.test:runner:0.3') {
exclude group: 'junit' // junit:junit-dep conflicts with junit:unit
}
diff --git a/android-lib/src/main/java/io/v/android/libs/discovery/ble/BlePlugin.java b/android-lib/src/main/java/io/v/android/libs/discovery/ble/BlePlugin.java
new file mode 100644
index 0000000..a0bbfd9
--- /dev/null
+++ b/android-lib/src/main/java/io/v/android/libs/discovery/ble/BlePlugin.java
@@ -0,0 +1,27 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package io.v.android.libs.discovery.ble;
+
+import android.bluetooth.le.BluetoothLeAdvertiser;
+
+import java.util.Map;
+import java.util.UUID;
+
+import io.v.v23.discovery.Service;
+import io.v.v23.discovery.VAdvertisement;
+
+public class BlePlugin {
+ private Map<Integer, VAdvertisement> mAdvertisements;
+ private Map<Integer, VScanner> mScannersById;
+
+ private Map<UUID, VScanner> mScannersByServiceId;
+
+ private BluetoothLeAdvertiser mBluetoothLeAdvertiser;
+
+
+ private void readvertise() {
+
+ }
+}
\ No newline at end of file
diff --git a/android-lib/src/main/java/io/v/android/libs/discovery/ble/VScanner.java b/android-lib/src/main/java/io/v/android/libs/discovery/ble/VScanner.java
new file mode 100644
index 0000000..45da270
--- /dev/null
+++ b/android-lib/src/main/java/io/v/android/libs/discovery/ble/VScanner.java
@@ -0,0 +1,4 @@
+package io.v.android.libs.discovery.ble;
+
+public class VScanner {
+}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c938d52..3adbe3f 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Fri Apr 03 13:08:46 PDT 2015
+#Thu Oct 01 14:08:26 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip
diff --git a/lib/src/main/java/io/v/v23/discovery/VAdvertisement.java b/lib/src/main/java/io/v/v23/discovery/VAdvertisement.java
new file mode 100644
index 0000000..b039d59
--- /dev/null
+++ b/lib/src/main/java/io/v/v23/discovery/VAdvertisement.java
@@ -0,0 +1,32 @@
+package io.v.v23.discovery;
+
+import java.util.UUID;
+
+/**
+ * VAdvertisement holds a set of service properties to advertise.
+ */
+public class VAdvertisement {
+ private Service mService;
+
+ private UUID mServiceUUID;
+
+ private boolean mLost;
+
+ public VAdvertisement(Service service, UUID serviceUUID, boolean lost) {
+ mService = service;
+ mServiceUUID = serviceUUID;
+ mLost = lost;
+ }
+
+ public Service getService() {
+ return mService;
+ }
+
+ public UUID getmServiceUUID() {
+ return mServiceUUID;
+ }
+
+ public boolean getLost() {
+ return mLost;
+ }
+}