I implement Activity X
. I got a PendingIntent P
from a Service S
. I know for sure, that P points to unknown Activity Y
which returns result R via its setResult
method.
How should I start P in X, in order to receive the result R in X.onActivityResult
?
Google Play Services uses PendingIntent
objects to resolve permission errors in the same scenario:
IntentSender intentSender = pendingIntent.getIntentSender();
activity.startIntentSenderForResult(intentSender, REQUEST_CODE, null, 0, 0, 0);
See Activity.startIntentSenderForResult() for documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With