Added in API level 37

AppContentProjectionSession


open class AppContentProjectionSession
kotlin.Any
   ↳ android.media.projection.AppContentProjectionSession

Represents a media projection session where the application receiving an instance of this class is sharing its own content.

The application must use this class to notify if the sharing session terminates from its side (e.g. the shared content is not available anymore).

Summary

Public methods
open Boolean

If true, this means that the user has requested the audio to be shared along with the app content.

open Unit

Notify the system that the content shared is not available anymore and the session must be stopped.

Public methods

isAudioRequested

Added in API level 37
open fun isAudioRequested(): Boolean

If true, this means that the user has requested the audio to be shared along with the app content.

notifySessionStop

Added in API level 37
open fun notifySessionStop(): Unit

Notify the system that the content shared is not available anymore and the session must be stopped.