Version: Smart Feature Phone 3.0

DeviceCapabilityManager service

Instanciating the service#

Load the following scripts:

<script src=""></script>
<script src=""></script>
<script src=""></script>

You can then get an instance of the service with code similar to:

const session = new lib_session.Session();
const sessionstate = {};
let _devicecapabilityManager = null;
sessionstate.onsessionconnected = function () {
console.log(`DeviceCapabilityManager onsessionconnected`);
lib_devicecapability.DeviceCapabilityManager.get(session).then((DeviceCapabilityManagerService) => {
console.log(`Got DeviceCapabilityManager : #DeviceCapabilityManagerService.service_id}`);
_devicecapabilityManager = DeviceCapabilityManagerService;
}).catch((e) => {
console.log(`Error calling DeviceCapabilityManager service${JSON.stringify(e)}`);
_devicecapabilityManager = null;
sessionstate.onsessiondisconnected = function () {
console.log(`DeviceCapabilityManager onsessiondisconnected Daemon Crashed`);
// On desktop version, set ENV WS_RUNTIME_TOKEN=secrettoken'websocket', 'localhost', 'secrettoken', sessionstate, true);

Then the developer can use _devicecapabilityManager as DeviceCapabilityManager service instance.

This service implements the DeviceCapabilityFactory interface.

DeviceCapabilityFactory Interface#



// feature: string

Resolves with json

Rejects with void

Sample code#

New APIs sample code