notify App State Changed
Notifies polyos that the app state has changed.
Use this only when this instance was created using {@link PolyOsManager(Context)}
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
val currentAppState = AppState()
//When in call, notify polyOs
currentAppState.inCall = true
polyOsManager.notifyAppStateChanged(currentAppState)
//When out of call, notify polyOs
currentAppState.inCall = false
polyOsManager.notifyAppStateChanged(currentAppState)
//sampleEnd
}Parameters
app State
The new AppState