Interface IPolyRoomService
com.poly.polyos.room
Interface IPolyRoomService
public interface
IPolyRoomService
Exposes API to communicate between apps running in the Room Primary device and Controller device.
The companion app of the app running the on primary device is its controller app running on the secondary device. The companion app of the app running on the secondary controller device is its app running on the primary device.
IPolyRoomService
can be used to send/receive messages between the above apps.
Apps on the primary and secondary devices are considered companion pairs if they have the same package. If the companion apps have different packages, they must be predefined in the Poly primary product.
Since:
3.0.31
Method Summary
Modifier and Type | Method and Description |
---|---|
DeviceType | getDeviceType() |
Returns the type of this device | |
DeviceInfo | getLocalDevice() |
Returns the information of this local device | |
java.util.List<DeviceInfo> | getPairedDevices() |
Returns the set of devices paired with this system | |
void | registerRoomListener (IPolyRoomListener roomListener) |
Registers a listener to get callback of messages | |
ResponseStatus | sendMessage(java.lang.String message) |
app (of this app) running on the companion device(s) | |
void | unRegisterRoomListener (IPolyRoomListener roomListener) |
Unregisters a listener |
Method Detail
getDeviceType
DeviceType getDeviceType()
Returns the type of this device
sendMessage
ResponseStatus sendMessage(java.lang.String message)
Sends a message to the companion app (of this app) running on the companion device(s)
Parameters:
message
- The message to send
Returns:
Returns the message delivery status
registerRoomListener
void registerRoomListener(IPolyRoomListener roomListener)
Registers a listener to get callback of messages
unRegisterRoomListener
void unRegisterRoomListener(IPolyRoomListener roomListener)
Unregisters a listener
getPairedDevices
java.util.List<DeviceInfo> getPairedDevices()
Returns the set of devices paired with this system
Since:
3.0.38
getLocalDevice
DeviceInfo getLocalDevice()
Returns the information of this local device
Since:
3.0.38