screenshotty icon indicating copy to clipboard operation
screenshotty copied to clipboard

onActivityResult is deprecated

Open samuelhalim1 opened this issue 3 years ago • 3 comments

How to implement this with a new way?

samuelhalim1 avatar Nov 01 '21 16:11 samuelhalim1

you could try

private val activityResult =
        registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
            screenshotManager.onActivityResult(REQUEST_CODE, it.resultCode, it.data)
        }

then launch it like this

        activityResult.launch(intent)

Isma3ilMohamed avatar Jan 15 '22 19:01 Isma3ilMohamed

Isma3ilMohamed

What is the intent?

HelloPaygua avatar Jan 15 '22 20:01 HelloPaygua

current activity intent

Isma3ilMohamed avatar Jan 16 '22 01:01 Isma3ilMohamed