Package com.poly.polyos

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

//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)
}

Types

Link copied to clipboard
data class AppState(    var cameraMuted: Boolean = false,     var inCall: Boolean = false,     var callOnHold: Boolean = false,     var sharingWhiteBoard: Boolean = false,     var sharingContent: Boolean = false)

Represents an app state.

Link copied to clipboard
interface IPolyOsManager

Interface exposing the functionality of PolyOsManager

Link copied to clipboard
interface IPolyService
Internal
Link copied to clipboard
open class PolyOsException : RuntimeException
Exception thrown by any PolyOs API.
Link copied to clipboard
interface PolyOsListener
Listener to know the state of connection with PolyOs.
Link copied to clipboard
open class PolyOsManager(    context: Context,     polyAppCallBacks: IPolyAppCallBacks?,     polyOsListener: PolyOsListener?) : IPolyOsManager

PolyOsManager exposes the api to communicate between a client application and PolyOs.

Link copied to clipboard
open class ResponseStatus
Defines generic response status