invoke
Suspends until connected with polyos and then invokes the given task
Since
3.12.0.0-1
Samples
import android.content.Context
import com.poly.polyos.AppState
import com.poly.polyos.PolyOsManager
import com.poly.polyos.audio.IPolyAudioListener
import com.poly.polyos.room.IPolyRoomListener
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
fun main() {
//sampleStart
//get mute state
//call through suspend helper. suspends until connected with service
val isMuted = polyOsManager { audioService.isMicrophoneMuted }
//Mute audio
polyOsManager { audioService.muteMicrophone(true) }
//sampleEnd
}