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.

Parameters

resultCode

the result code from the screen capture request

resultData

the result data from the screen capture request