Is it possible to know which package or process sent the Intent result?
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
I found a way to know which apps are capable of handling this intent, but I also want to know which one was selected, or rather, which one returned the result. Is this possible?
It depends on apps how they are developed. Some apps returns an Intent object full of stuff, other empty or null.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent i) {
if (i!=null){
i.getPackage();
i.getExtras();
i.getData();
i.getScheme();
i.getType();
}
}
Try to log/read all possible values inside Intent.
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