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

This commit will fix opening url with query parameters on iOS. #257

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://img.shields.io/badge/Flutter%20Communityflutter__webview__plugin-blue.svg?style=for-the-badge&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA5CAYAAABwDahPAAAAB3RJTUUH4gYTFygnu4qzzAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAAARnQU1BAACxjwv8YQUAAAjVSURBVHjazZp5UJTnHcddWO5rd9ndd99llUMUUVhOYTnEaNAFYbk0cXJZlTRNWyqHlRtzNE0yJURFzkUSBUSjMZkYoqTT6B/SeDSYtBoOj1i1TpNpZ/yjje2MwK/P8+zhArv7vu++u05/M88Ms7M87+f7u57j3QULXGTuAUulAYuL82QJZT1KTcM4ndL4L88FP4eC/uvw7B8e4PFgy7npH7iNqR9KRwG0XV/+wiXQ3opVsaKoZ6vlieWn6NTau8q0ph9D0nfPKDVNEEiXQ/aeL2HLyLRhnMNjitPYdhFg40d3PpIma72cBu3mG+YXGLlpO5VcNRKS/gqoMl+HkIxXAf+N4IFObYQgVQWCPw9bz4MRnhv4I/jbJ5wGLvBUCEVRz5XRmvo7j6B3zxom+HX7LsDWC47CT5P/LT5+a8hp8H6Lcp6kU2omCLjR09bgA5X84bHnCwZugDy++m9eovxtvOGDY15sDsl4zarHZ3l+USVk7+WTNo/gFUkNQCXWk/SUJ1Z8IhSrpZzBhYHRUip55x8NXt9tH35hhQGet+dvAhVfh+DrzPOr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O0eA4gDAixFKC1edIujt9Q/omEoYlvm7r8kQKp+WU8iYatLYc+h4qa1e3mLoPNRGiZXnfWSaaIcArZl3sonEuSJOz7GQqz++Mksgl8k8DoRnPOO697weNOr41B9tKDCuokjQjqWZa1gEevfRSIOsi7k+SL60bZjzymBX6iby4S4eS/08lVlr5Es37obReYLxcrqMWVa430UiSmTCIejYNx2YBFuklg/l4mwNIEn7e67cH2yJKa0BnWOIUVC+RV5TssYWokn5Lp2h4aipPfHwPSdL5qe8T+XgeDXeA98zQAAAABJRU5ErkJggg==" width="800">
<img src="https://img.shields.io/badge/Flutter%20Communityflutter__webview__plugin-blue.svg?style=for-the-badge&logo=src.data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA5CAYAAABwDahPAAAAB3RJTUUH4gYTFygnu4qzzAAAAAlwSFlzAAAewgAAHsIBbtB1PgAAAARnQU1BAACxjwv8YQUAAAjVSURBVHjazZp5UJTnHcddWO5rd9ndd99llUMUUVhOYTnEaNAFYbk0cXJZlTRNWyqHlRtzNE0yJURFzkUSBUSjMZkYoqTT6B/SeDSYtBoOj1i1TpNpZ/yjje2MwK/P8+zhArv7vu++u05/M88Ms7M87+f7u57j3QULXGTuAUulAYuL82QJZT1KTcM4ndL4L88FP4eC/uvw7B8e4PFgy7npH7iNqR9KRwG0XV/+wiXQ3opVsaKoZ6vlieWn6NTau8q0ph9D0nfPKDVNEEiXQ/aeL2HLyLRhnMNjitPYdhFg40d3PpIma72cBu3mG+YXGLlpO5VcNRKS/gqoMl+HkIxXAf+N4IFObYQgVQWCPw9bz4MRnhv4I/jbJ5wGLvBUCEVRz5XRmvo7j6B3zxom+HX7LsDWC47CT5P/LT5+a8hp8H6Lcp6kU2omCLjR09bgA5X84bHnCwZugDy++m9eovxtvOGDY15sDsl4zarHZ3l+USVk7+WTNo/gFUkNQCXWk/SUJ1Z8IhSrpZzBhYHRUip55x8NXt9tH35hhQGet+dvAhVfh+DrzPOrkPNQV/u7ryo7kzW8pzw9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omEoYlvm7r8kQKp+WU8iYatLYc+h4qa1e3mLoPNRGiZXnfWSaaIcArZl3sonEuSJOz7GQqz++Mksgl8k8DoRnPOO697weNOr41B9tKDCuokjQjqWZa1gEevfRSIOsi7k+SL60bZjzymBX6iby4S4eS/08lVlr5Es37obReYLxcrqMWVa430UiSmTCIejYNx2YBFuklg/l4mwNIEn7e67cH2yJKa0BnWOIUVC+RV5TssYWokn5Lp2h4aipPfHwPSdL5qe8T+XgeDXeA98zQAAAABJRU5ErkJggg==" width="800">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's formatted by mistake


[Flutter Community](https://github.com/fluttercommunity/community)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import android.util.Log;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;

import android.os.*;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -114,6 +115,16 @@ public void onScroll(int x, int y, int oldx, int oldy){
webView.setWebViewClient(webViewClient);
webView.setWebChromeClient(new WebChromeClient()
{
// For opening external browser window
@Override
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture,
Message resultMsg) {
WebView newWebView = new WebView(view.getContext());
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(newWebView);
resultMsg.sendToTarget();
return true;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this PR just for iOS?

//The undocumented magic method override
//Eclipse will swear at you if you try to put @Override here
// For Android 3.0+
Expand Down
4 changes: 1 addition & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ android {

defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.yourcompany.flutter_webview_plugin_example"
applicationId "com.penrad.penmobile"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert our example applicationId :)

}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
Expand Down
Loading