https://kotlinlang.org logo
#android
Title
# android
m

myanmarking

05/15/2020, 1:44 PM
hello. Does any1 managed to get onActivityResult new API to work without starting the intent explicitly ? (i mean, just receive some result started not by the application)
a

Adam Powell

05/15/2020, 1:54 PM
I'm not sure I understand the question. It sounds a bit like you're asking if it's possible to get the return value from a function without calling the function.
m

myanmarking

05/15/2020, 1:55 PM
i want to use this api to receive a result from location services startResolutionForResult:
Copy code
status.startResolutionForResult(
                         OuterClass.this,
                         // An arbitrary constant to disambiguate activity results.
                         REQUEST_CHECK_SETTINGS);
i'm trying to find a way, i don't think it's possible, be i'm not the one starting the intent
The ActivityResultContract has a launch method, but it wont work because it needs to be started with: startIntentSenderForResult
oh, i checked latest version. it's now supported
Copy code
ActivityResultContracts.StartIntentSenderForResult()
10 Views