hello. Does any1 managed to get onActivityResult n...
# android
m
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
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
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()