diff --git a/ClientLib/mobile/build.gradle b/ClientLib/mobile/build.gradle index 9e3b31949f..1b267bd683 100644 --- a/ClientLib/mobile/build.gradle +++ b/ClientLib/mobile/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_ARTIFACT_ID = '3dr-services-lib' - PUBLISH_VERSION = '2.2.7' + PUBLISH_VERSION = '2.2.8' PROJECT_DESCRIPTION = "3DR Services Client Library" PROJECT_LABELS = ['3DR', '3DR Services', 'DroneAPI', 'Android'] PROJECT_LICENSES = ['Apache-2.0'] @@ -15,7 +15,7 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 21 - versionCode 20207 + versionCode 20208 versionName PUBLISH_VERSION } diff --git a/ClientLib/mobile/src/main/java/com/o3dr/android/client/ControlTower.java b/ClientLib/mobile/src/main/java/com/o3dr/android/client/ControlTower.java index 8c7e9a44aa..44dc08a885 100644 --- a/ClientLib/mobile/src/main/java/com/o3dr/android/client/ControlTower.java +++ b/ClientLib/mobile/src/main/java/com/o3dr/android/client/ControlTower.java @@ -15,6 +15,7 @@ import com.o3dr.android.client.utils.InstallServiceDialog; import com.o3dr.android.client.utils.UpdateServiceDialog; import com.o3dr.services.android.lib.BuildConfig; +import com.o3dr.services.android.lib.drone.connection.ConnectionParameter; import com.o3dr.services.android.lib.model.IDroidPlannerServices; import java.util.concurrent.atomic.AtomicBoolean; @@ -98,15 +99,21 @@ void notifyTowerDisconnected() { } public Bundle[] getConnectedApps() { + Bundle[] connectedApps = new Bundle[0]; if (isTowerConnected()) { try { - return o3drServices.getConnectedApps(getApplicationId()); + connectedApps = o3drServices.getConnectedApps(getApplicationId()); + if(connectedApps != null){ + for(Bundle appInfo: connectedApps){ + appInfo.setClassLoader(ConnectionParameter.class.getClassLoader()); + } + } } catch (RemoteException e) { Log.e(TAG, e.getMessage(), e); } } - return new Bundle[0]; + return connectedApps; } public void registerDrone(Drone drone, Handler handler) { diff --git a/ClientLib/mobile/src/main/java/com/o3dr/android/client/Drone.java b/ClientLib/mobile/src/main/java/com/o3dr/android/client/Drone.java index 5201ff5002..99032bb1a9 100644 --- a/ClientLib/mobile/src/main/java/com/o3dr/android/client/Drone.java +++ b/ClientLib/mobile/src/main/java/com/o3dr/android/client/Drone.java @@ -442,7 +442,8 @@ public void registerDroneListener(DroneListener listener) { if (listener == null) return; - droneListeners.add(listener); + if (!droneListeners.contains(listener)) + droneListeners.add(listener); } private void addAttributesObserver(IObserver observer) {