PolyOsManager

fun PolyOsManager(context: Context)

Creates an instance of PolyOsManager.

Notify app state changes using notifyAppStateChanged

Since

3.12.0.0-1

Parameters

context

Android Context.


fun PolyOsManager(    context: Context,     polyAppCallBacks: IPolyAppCallBacks?,     polyOsListener: PolyOsListener?)

Creates an instance of PolyOsManager.

Use [isConnected] to know whether this instance is connected with PolyOs yet.

Listen for the connected state changes using PolyOsListener.onConnectionChanged call back, or using connectedState.

Perform any initialization only after the PolyOsManager becomes connected, and re-initialize them each time it gets connected.

Use runWhenConnected to automatically do the initialization block each time PolyOsManager gets connected.

Once connected any of the other methods like [.getAudioService] will return the corresponding service

Or use [invoke] suspend function to call any methods.

Parameters

context

Context to use

polyAppCallBacks

The IPolyAppCallBacks so that PolyOs can query/listen to app changes

polyOsListener

The PolyOsListener to know connected state and any other call backs