Skip to main content

PolyOS API Overview

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

This API can be called from either DeviceType.PRIMARY or 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"
}

License

PolyOS API License : EULA

Packages

PackageDescription
com.poly.polyosPolyOsManager is the entry point to PolyOS API.
com.poly.polyos.analyticsExposes Analytics data
com.poly.polyos.audioAudio related API
com.poly.polyos.cameraCamera related API
com.poly.polyos.roomExposes API to communicate between companion pair apps running in the Room Primary device and Controller devices.
com.poly.polyos.settingsConfiguration settings related API
com.poly.polyos.systemSystem related API