startSharing

abstract fun startSharing(callback: CompletionHandler<Void>, shareConfig: ShareConfig? = null)

Start content sharing.

Invalid if targetSdkVersion is 29 or higher, please use Call.startSharing

Since

1.4

Parameters

callback

A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise null

shareConfig

is optional. If not set, optimization will be Default and audio won't be shared


abstract fun startSharing(    notification: <Error class: unknown class>?,     notificationId: Int,     callback: CompletionHandler<Void>,     shareConfig: ShareConfig? = null)

Start content sharing. The notification and it's id are only work for targetSdkVersion is 29 or higher.

Since

2.8.0

See also

[](https://developer.android.com/reference/android/media/projection/MediaProjectionManager.getMediaProjection

Parameters

notification

The foreground notification when sharing, take effect if targetSdkVersion is 29 or higher.

notificationId

The id of this notification, take effect if targetSdkVersion is 29 or higher, must a positive number.

callback

A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise null

shareConfig

is optional. If not set, optimization will be Default and audio won't be shared.