Standalone Property Mode
When a remote device has complex properties, they will be displayed as simple element in the list on the device-main-page. This element can be used to navigate to a separate page which contains the actual user-interface to interact with the device property.
But if a remote device has only one complex property, the device-main-page is kind of useless. This is where the Standalone-Mode comes into play. When this mode is activated with the setStandAloneMode method of the LaRoomy Api, the device-main-page will not being shown. Instead, the complex property page will be invoked directly.
How it works
The following example shows how an UnlockControl property is added to the LaRoomy Api and after that the StandAlone-Mode is activated. It is an easy procedure:
/* other setup: init api and set callback and so on .. */
// create the unlock control property
UnlockControl uc ;
uc .imageID = LaRoomyImages::LOCK_CLOSED_021 ;
uc .unlockControlDescription = "Unlock";
uc .unlockControlID = MY_UNLOCK_CONTRO L;
// load the pin
uc .unlockControlState .pin = PinStorageController .loadPin();
// add the property
LaRoomyApi .addDeviceProperty(uc );
// activate the standalone-mode
LaRoomyApi .setStandAloneMode(true);
// run it
LaRoomyApi .run();
The Standalone-Mode will not work if more than one property is added or if the added property is not a complex property.
The device-settings-page will be accessible through a settings button on the complex property page which will only be shown if the property is running in Standalone-Mode.
The following functionalities will not work in Standalone-Mode:
- Property reload command (LaRoomyApi::sendPropertyReloadCommand)
- Forced back navigation command (LaRoomyApi::sendNavBackToDeviceMainCommand)