feature.setCode("DEVICE_LOCK"); feature.setName("Device Lock"); feature.setDescription("Lock the device"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("CAMERA"); feature.setName("camera"); feature.setDescription("Enable or disable camera"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("DEVICE_INFO"); feature.setName("Device info"); feature.setDescription("Request device information"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("WIPE_DATA"); feature.setName("Wipe Data"); feature.setDescription("Factory reset the device"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("ENCRYPT_STORAGE"); feature.setName("Encrypt storage"); feature.setDescription("Encrypt storage"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("DEVICE_RING"); feature.setName("Ring"); feature.setDescription("Ring the device"); supportedFeatures.add(feature);
private static org.wso2.carbon.device.mgt.common.Feature map(Feature feature) { org.wso2.carbon.device.mgt.common.Feature rv = new org.wso2.carbon.device.mgt.common.Feature(); rv.setId(feature.getId()); rv.setCode(feature.getCode()); rv.setDescription(feature.getDescription()); rv.setDeviceType(feature.getDeviceType()); List<org.wso2.carbon.device.mgt.common.Feature.MetadataEntry> metadataEntries = new ArrayList<>(); feature.getMetadataEntries().forEach(metadataEntry -> { metadataEntries.add(map(metadataEntry)); }); rv.setMetadataEntries(metadataEntries); return rv; }
feature.setCode("DEVICE_LOCK"); feature.setName("Device Lock"); feature.setDescription("Lock the device"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("DEVICE_LOCATION"); feature.setName("Location"); feature.setDescription("Request coordinates of device location"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("WIFI"); feature.setName("wifi"); feature.setDescription("Setting up wifi configuration"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("CAMERA"); feature.setName("camera"); feature.setDescription("Enable or disable camera"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("EMAIL"); feature.setName("Email"); feature.setDescription("Configure email settings"); supportedFeatures.add(feature); feature = new Feature(); feature.setCode("DEVICE_MUTE"); feature.setName("mute"); feature.setDescription("Enable mute in the device"); supportedFeatures.add(feature);
public static Feature convertToFeature(MobileFeature mobileFeature) { Feature feature = new Feature(); feature.setDescription(mobileFeature.getDescription()); feature.setDeviceType(mobileFeature.getDeviceType()); feature.setCode(mobileFeature.getCode()); feature.setName(mobileFeature.getName()); return feature; }