You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation in https://capacitor.ionicframework.com/docs/plugins/android/ section Intents with result, missing the fact you need to register your requestCode in the plugin class @NativePlugin annotation for handleOnActivityResult to be called.
Using the example in the documentation:
static final int REQUEST_IMAGE_PICK = 12345;
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(call, intent, REQUEST_IMAGE_PICK);
For this to work the plugin class would also require:
@NativePlugin(
requestCodes={MyPlugin.REQUEST_IMAGE_PICK}
)
public class MyPlugin extends Plugin {
....
The text was updated successfully, but these errors were encountered:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Documentation in https://capacitor.ionicframework.com/docs/plugins/android/ section Intents with result, missing the fact you need to register your requestCode in the plugin class @NativePlugin annotation for handleOnActivityResult to be called.
Using the example in the documentation:
static final int REQUEST_IMAGE_PICK = 12345;
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(call, intent, REQUEST_IMAGE_PICK);
For this to work the plugin class would also require:
@NativePlugin(
requestCodes={MyPlugin.REQUEST_IMAGE_PICK}
)
public class MyPlugin extends Plugin {
....
The text was updated successfully, but these errors were encountered: