-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Adding closeWebView feature to url_launcher #924
Conversation
… has not been implemented yet)
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@thosakwe looks like you need to confirm that you are okay with the use of your code here 😃 |
@googlebot I am ok / approve / whatever magic word |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
...ges/url_launcher/android/src/main/java/io/flutter/plugins/urllauncher/UrlLauncherPlugin.java
Outdated
Show resolved
Hide resolved
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@timtraversy @thosakwe I'm having a hard time understanding the PR, i can see it allows closing the WebView from Dart code, was wondering how to close the WebView controller from within the controller. |
I don't think I understand the question. Are you wondering how to close the WebView from within the Android code? This plugin is supposed to abstract that so you only interact with Dart code as a developer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update CHANGELOG and rev the pubspec.yaml version as well.
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) |
Woohoo! Thanks @timtraversy and @mehmetf for helping to finally land this.
:tada:
…On Sun, Nov 25, 2018 at 5:55 PM Mehmet Fidanboylu ***@***.***> wrote:
Merged #924 <#924> into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#924 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJiKPOlgNLSutLylDATYPcZKhNAxFXX7ks5uyx_mgaJpZM4YxFWp>
.
|
When can we expect 4.0.2 to be released? |
Pretty sure it’s live right now. |
Weird. I'm seeing this:
|
Released to pub. |
I'm honestly not sure what this change is supposed to do. On Android it's a no-op and on iOS is completely broken. The following code:
Will kill _currentSession as soon as the webview is loaded, therefore when you call closeWebView you will not see a non-nil value unless you really killed it before the webpage loaded. |
Hm. I added that completion handler because I thought it was called when the user dismissed the VC, but now looking at the docs I see it it's called when the VC is finished loading. That completion handler needs to moved to the |
Thanks @timtraversy ! |
This still does not work for me. I call Here is how I launch my app: const url = 'random_url';
if (await canLaunch(url)) {
await launch(url,forceWebView: true,forceSafariVC: true, enableJavaScript: true);
} else {
throw 'Could not launch $url';
} |
The iOS side of this wasn’t built correctly in this PR. I fixed it in #997 but that has to Ben merger before it will work. |
Does this in any way make the calling screen destroy its state. I noticed something unusual while testing your solution though just for iOS. |
What occurred? The state was reset? |
This reverts commit 1f9c71e.
This pull request builds on the work of #658, mostly to address the edits suggested by @mehmetf. Started a new PR since I didn't have write access to thosakwe's branch, so I believe we can close that one and work here.
Changes:
BroadcastReceiver
to communicate close request to WebView.SFSafariViewController
duringFLTUrlLaunchSession
initiation.And, like the original PR, this adds a test button to the example project that closes the web view after 5 seconds.