PolyOs API

PolyOS API exposes the API between PolyOs and 3rd party applications.

This API can be called from either com.poly.polyos.room.DeviceType.PRIMARY or com.poly.polyos.room.DeviceType.CONTROLLER device.

Setup

//Create PolyOsManager, the entry point to PolyOs API
polyOsManager = PolyOsManager(context)

//Notify PolyOS when app state changes
polyOsManager.notifyAppStateChanged(AppState(inCall = true))


//Access PolyOs methods through helper suspend function
val isMuted = polyOsManager { audioService.isMicrophoneMuted }
//Mute microphone
polyOsManager { audioService.muteMicrophone(true)}


//Use runWhenConnected to perform any initialization or registration each time when PolyOsManager is connected

polyOsManager.runWhenConnected {

//Register for audio notifications
audioService.registerAudioListener(audioListener)

//Register for messages
roomService.registerRoomListener(roomListener)
}

Getting PolyOS API

repositories {
maven {
url 'http://public.polyrepo.com/artifactory/poly-local/'
allowInsecureProtocol = true
}
}

dependencies {
implementation 'com.poly.polyos:polyos-library:#VERSION'

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1"
}

Changelog4.2.0.0-9 (2024-02-14)

  • Add setPTZ, getPTZ to interface IPolyCameraService to easy camera control from Tencent Rooms App.

  • Created CameraPTZValue class to represents camera PTZ values. reset camera PTZ

//Create PolyOsManager, the entry point to PolyOs API
val polyOsManager = PolyOsManager(context)

//Obtain cameraService
val cameraService = polyOsManager.cameraService

//reset PTZ values
cameraService.moveToHomePosition(cameraId)

Previous change logs

License

PolyOs API License : EULA

Packages

Link copied to clipboard

com.poly.polyos.PolyOsManager is the entry point to PolyOs API

Link copied to clipboard

Exposes Analytics data

Link copied to clipboard

Audio related API

Link copied to clipboard

Camera related API

Link copied to clipboard

Exposes API to communicate between companion pair apps running in the Room Primary device and Controller devices.

Link copied to clipboard

Configuration settings related API

Link copied to clipboard

System related API