Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with "intentstart":"startActivityForResult" #154

Open
csampalis opened this issue Oct 22, 2020 · 1 comment
Open

problem with "intentstart":"startActivityForResult" #154

csampalis opened this issue Oct 22, 2020 · 1 comment

Comments

@csampalis
Copy link

csampalis commented Oct 22, 2020

I have a problem with "intentstart":"startActivityForResult". The plugin always ends up calling both startActivityForResult and startActivity.
Maybe it should have been if, else if, else instead of if, if, else? Am I missing something?

if (params.has("intentstart") && "startActivityForResult".equals(params.getString("intentstart"))) {
    cordova.setActivityResultCallback(this);
    callbackContext = callback;
    cordova.getActivity().startActivityForResult(LaunchIntent, 1);
}
if (params.has("intentstart") && "sendBroadcast".equals(params.getString("intentstart"))) {
    cordova.getActivity().sendBroadcast(LaunchIntent);
} else {
    cordova.getActivity().startActivity(LaunchIntent);
}
@lampaa
Copy link
Owner

lampaa commented Oct 28, 2020

@csampalis hmm

Yes, it looks like a bug

SametKahraman added a commit to SametKahraman/com.lampa.startapp that referenced this issue Nov 27, 2020
lampaa added a commit that referenced this issue Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants