Poly Os 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)
}
Content copied to clipboard
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"
}
Content copied to clipboard
Changelog4.2.0.0-11 (2024-02-27)
Add onPresenterTrackingInfoChanged to IPolyCameraListener to notify presenter tracking info changed event.
Add bottom, right property to data class Rectangle.
License
Packages
Link copied to clipboard
com.poly.polyos.PolyOsManager is the entry point to PolyOs API
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard