Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onActivityResult is deprecated #24

Open
samuelhalim1 opened this issue Nov 1, 2021 · 3 comments
Open

onActivityResult is deprecated #24

samuelhalim1 opened this issue Nov 1, 2021 · 3 comments

Comments

@samuelhalim1
Copy link

How to implement this with a new way?

@Isma3ilMohamed
Copy link

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)

@HelloPaygua
Copy link

Isma3ilMohamed

What is the intent?

@Isma3ilMohamed
Copy link

current activity intent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants