getMediaProjection

fun Context.getMediaProjection(resultCode: Int, resultData: Intent): MediaProjection?

Gets the MediaProjection from the result of the screen capture request.

This is a convenience method to avoid casting the system service to MediaProjectionManager.

Return

the MediaProjection or null if the request was denied

Parameters

resultCode

the result code from the screen capture request

resultData

the result data from the screen capture request