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

openWebPage doesn't return #12

Open
passsy opened this issue Oct 28, 2019 · 0 comments
Open

openWebPage doesn't return #12

passsy opened this issue Oct 28, 2019 · 0 comments

Comments

@passsy
Copy link

passsy commented Oct 28, 2019

await FlutterWebBrowser.openWebPage(url: url); hangs forever

private void openUrl(MethodCall call, Result result) {
String url = call.argument("url");
String toolbarColorArg = call.argument("android_toolbar_color");
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
if (toolbarColorArg != null) {
int toolbarColor = Color.parseColor(toolbarColorArg);
builder.setToolbarColor(toolbarColor);
}
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(activity, Uri.parse(url));
}

result is unused and never completes the platform channel call.

It should at least result.success("launched") be called after successfully launching the intent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant