diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/pom.xml b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/pom.xml
index 3fff740804..245066e88c 100644
--- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/pom.xml
+++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/pom.xml
@@ -136,6 +136,11 @@
jsr311-api
provided
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.annotations
+ provided
+
diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java
index 33afec0138..903fc8af49 100644
--- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java
+++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/ArduinoService.java
@@ -21,6 +21,9 @@ package org.wso2.carbon.device.mgt.iot.arduino.service;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.apimgt.annotations.api.API;
+import org.wso2.carbon.apimgt.annotations.device.DeviceType;
+import org.wso2.carbon.apimgt.annotations.device.feature.Feature;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
@@ -67,7 +70,8 @@ import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
-@Path("/ArduinoDeviceManager")
+@API( name="arduino", version="1.0.0", context="/arduino")
+@DeviceType( value = "arduino")
public class ArduinoService {
private static Log log = LogFactory.getLog(ArduinoService.class);
@@ -479,6 +483,8 @@ public class ArduinoService {
*/
@Path("controller/bulb/{state}")
@POST
+ @Feature( code="ARDUINO_BULB_CONTROL", name="Control Bulb",
+ description="Control Bulb on Arduino Arduino")
public void switchBulb(@HeaderParam("owner") String owner,
@HeaderParam("deviceId") String deviceId,
@HeaderParam("protocol") String protocol,
@@ -548,6 +554,8 @@ public class ArduinoService {
@Path("controller/pushdata")
@POST
@Consumes(MediaType.APPLICATION_JSON)
+ @Feature( code="ARDUINO_READ_DATA", name="Read Data",
+ description="Read Data from Arduino")
public void pushData(final DeviceJSON dataMsg, @Context HttpServletResponse response) {
String owner = dataMsg.owner;
@@ -640,6 +648,8 @@ public class ArduinoService {
@Path("controller/push_temperature")
@POST
@Consumes(MediaType.APPLICATION_JSON)
+ @Feature( code="ARDUINO_READ_TEMP", name="Read Tempreature",
+ description="Read Tempreature from Arduino")
public void pushTemperatureData(final DeviceJSON dataMsg,
@Context HttpServletResponse response,
@Context HttpServletRequest request) {
diff --git a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/WEB-INF/web.xml b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/WEB-INF/web.xml
index 87f9c84601..652c3f454a 100644
--- a/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/WEB-INF/web.xml
+++ b/components/device-mgt-iot-arduino/org.wso2.carbon.device.mgt.iot.arduino.service.impl/src/main/webapp/WEB-INF/web.xml
@@ -37,22 +37,6 @@
managed-api-owner
admin
-
- managed-api-name
- arduino
-
-
- managed-api-endpoint
- http://localhost:9763/arduino
-
-
- managed-api-version
- 1.0.0
-
-
- managed-api-context
- /arduino
-
managed-api-context-template
/arduino/{version}
@@ -67,4 +51,5 @@
+
diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayControllerService.java b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayControllerService.java
index 9a8fba5ba7..60d3028930 100644
--- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayControllerService.java
+++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayControllerService.java
@@ -20,7 +20,6 @@ import javax.ws.rs.core.Response;
* Created by nuwan on 11/13/15.
*/
-@Path("/DigitalDisplayDeviceManager")
@API( name="digital_display", version="1.0.0", context="/digital_display")
@DeviceType( value = "digital_display")
public class DigitalDisplayControllerService {
diff --git a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayManagerService.java b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayManagerService.java
index 39f5ebf044..10d1e5f624 100644
--- a/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayManagerService.java
+++ b/components/device-mgt-iot-digitaldisplay/org.wso2.carbon.device.mgt.iot.digitaldisplay.api/src/main/java/org/wso2/carbon/device/mgt/iot/digitaldisplay/api/DigitalDisplayManagerService.java
@@ -18,6 +18,8 @@ package org.wso2.carbon.device.mgt.iot.digitaldisplay.api;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.apimgt.annotations.api.API;
+import org.wso2.carbon.apimgt.annotations.device.DeviceType;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
@@ -38,6 +40,7 @@ import java.util.Date;
import java.util.UUID;
@WebService
+@API( name="digital_display", version="1.0.0", context="/digital_display")
public class DigitalDisplayManagerService {
private static Log log = LogFactory.getLog(DigitalDisplayManagerService.class);
diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/pom.xml b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/pom.xml
index 1bfc45ccfa..096708093a 100644
--- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/pom.xml
+++ b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/pom.xml
@@ -215,6 +215,12 @@
4.0
+
+ org.wso2.carbon.devicemgt
+ org.wso2.carbon.apimgt.annotations
+ provided
+
+
diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneService.java b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneService.java
index e2b21bf811..55218fe0a8 100644
--- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneService.java
+++ b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/java/org/wso2/carbon/device/mgt/iot/droneanalyzer/service/DroneService.java
@@ -18,6 +18,9 @@
package org.wso2.carbon.device.mgt.iot.droneanalyzer.service;
import org.apache.commons.logging.LogFactory;
+import org.wso2.carbon.apimgt.annotations.api.API;
+import org.wso2.carbon.apimgt.annotations.device.DeviceType;
+import org.wso2.carbon.apimgt.annotations.device.feature.Feature;
import org.wso2.carbon.certificate.mgt.core.dto.SCEPResponse;
import org.wso2.carbon.certificate.mgt.core.exception.KeystoreException;
import org.wso2.carbon.certificate.mgt.core.service.CertificateManagementService;
@@ -59,7 +62,8 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
-@Path("/DroneAnalyzerServiceUnitManager")
+@API( name="drone_analyzer", version="1.0.0", context="/drone_analyzer")
+@DeviceType( value = "drone_analyzer")
public class DroneService {
private static org.apache.commons.logging.Log log = LogFactory.getLog(DroneService.class);
@@ -373,6 +377,8 @@ public class DroneService {
@Path("controller/send_command")
@POST
+ @Feature( code="DRONE_SEND_COMMAND", name="Send Command",
+ description="Send Commands to Drone")
public Response droneController(@QueryParam("owner") String owner, @QueryParam("deviceId") String deviceId,
@QueryParam("action") String action, @QueryParam("duration") String duration,
@QueryParam("speed") String speed){
diff --git a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/webapp/WEB-INF/web.xml b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/webapp/WEB-INF/web.xml
index d296aac1dd..44386ec109 100644
--- a/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/webapp/WEB-INF/web.xml
+++ b/components/device-mgt-iot-droneanalyzer/org.wso2.carbon.device.mgt.iot.droneanalyzer.api/src/main/webapp/WEB-INF/web.xml
@@ -38,29 +38,13 @@
admin
- managed-api-name
- drone_analyzer
-
-
- managed-api-endpoint
- http://localhost:9763/drone_analyzer
+ managed-api-context-template
+ /drone_analyzer/{version}
- managed-api-version
- 1.0.0
-
-
- managed-api-context
- /drone_analyzer
+ managed-api-application
+ drone_analyzer
-
- managed-api-context-template
- /drone_analyzer/{version}
-
-
- managed-api-application
- drone_analyzer
-
managed-api-isSecured
true
diff --git a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java
index 128f9a2561..0d884fe441 100644
--- a/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java
+++ b/components/device-mgt-iot-virtualfirealarm/org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/VirtualFireAlarmService.java
@@ -80,7 +80,6 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
-@Path("/VirtualFireAlarmDeviceManager")
@API( name="virtual_firealarm", version="1.0.0", context="/virtual_firealarm")
@DeviceType( value = "virtual_firealarm")
public class VirtualFireAlarmService {
diff --git a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk
index 3f5405286e..d369c0f810 100644
Binary files a/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk and b/features/device-mgt-iot-androidsense-feature/org.wso2.carbon.device.mgt.iot.androidsense.feature/src/main/resources/agent/androidsense.apk differ