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

Inline Android and iOS WebView #730

Closed
eseidelGoogle opened this Issue Dec 4, 2015 · 96 comments

Comments

@eseidelGoogle
Copy link
Contributor

eseidelGoogle commented Dec 4, 2015

Presumably this requires some compositor work, similar to maps or video?

@eseidelGoogle eseidelGoogle added the plugin label Dec 4, 2015

@Hixie Hixie added this to the Blue Sky milestone Dec 11, 2015

@jxson

This comment has been minimized.

Copy link

jxson commented Jan 4, 2016

Adding an example use case for this:

I have a hybrid Android application where some rendering is handled by a WebView but controls for things like navigation are handled by native UI widgets. I would like to port a version to Flutter, off the top of my head the requirements for getting this to work are:

The last item here allows us to stream the contents of PDF files to the WebView. The current Android implementation intercepts HTTP requests from the WebView and streams back the contents of the requested PDF file. The implementation can be seen here.

I'm new to Flutter so I may have gotten some of the terminology wrong, let me know if you need clarification on anything.

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor

eseidelGoogle commented May 13, 2016

We're currently moving towards an approach of making it easier to use native views in conjunction with FlutterView:
https://docs.google.com/document/d/1DOfwpL6VojCAG_zjjcA_z5ekF7rTIohV8dWn2o7_IME/edit

@Hixie

This comment has been minimized.

Copy link
Contributor

Hixie commented May 13, 2016

This is more about having a way to put a WebView within a Flutter widget tree, I think. As you say in your original comment, we need something similar for embedding videos or maps provided by a third-party non-Flutter library.

@jingweno

This comment has been minimized.

Copy link

jingweno commented Jan 17, 2017

Any updates on integrating a webview with flutter?

@abarth abarth modified the milestones: 5: Make Hixie proud, 4: Make shippers happy Jan 26, 2017

@mit-mit mit-mit added framework and removed plugin labels Feb 2, 2017

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor

eseidelGoogle commented May 14, 2017

Looks like someone has started a plugin to do full screen webviews: https://github.com/dart-flitter/flutter_webview_plugin

@xster

This comment has been minimized.

Copy link
Contributor

xster commented May 20, 2017

I think doing the activity subset is a great start. It would unlock a whole set of app types that would need getting an oauth token from a web login.

@sethladd

This comment has been minimized.

Copy link
Contributor

sethladd commented Jun 19, 2017

FWIW: here's the PR for the iOS version of the webview plugin: fluttercommunity/flutter_webview_plugin#3

@lejard-h

This comment has been minimized.

Copy link

lejard-h commented Jun 20, 2017

We now have the webview plugin on IOS thanks to @toufikzitouni 👍 https://pub.dartlang.org/packages/flutter_webview_plugin

@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Make shippers happy Jun 20, 2017

@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Next milestone Dec 13, 2017

@Hixie

This comment has been minimized.

Copy link
Contributor

Hixie commented Dec 13, 2017

This is not on our short-term priority list. Moving to next milestone.

@csbenjamin

This comment has been minimized.

Copy link

csbenjamin commented Dec 22, 2017

It would be great to have a webview and a way to interacting with it. I want to show embedded YouTube video and to control the player. Right now I am using https://github.com/dart-flitter/flutter_webview_plugin, but I am using some hack for some situations. For example, I change the webview URL in JavaScript after the video ends in order to the flutter app to receive an event onUrlChange and then to close the webview.

@eseidelGoogle

This comment has been minimized.

Copy link
Contributor

eseidelGoogle commented Dec 22, 2017

@csbenjamin Are you specifically looking for YouTube you prefer https://developers.google.com/youtube/android/player/ over a WebView to control? Or did you also need a WebView? If you're looking for a YouTube specific player, please file a new bug, that's definitely a reasonable request. :)

@csbenjamin

This comment has been minimized.

Copy link

csbenjamin commented Dec 22, 2017

Yes, I am looking for YouTube player. I don't need anything from webview, just a YouTube player. I will open a new issue. Thanks

@megatolya

This comment has been minimized.

Copy link

megatolya commented Dec 26, 2017

We have to open payment web form and this feature is blocker for us 😢

@lejard-h

This comment has been minimized.

Copy link

lejard-h commented Dec 29, 2017

@megatolya the webview plugin cannot do the job for you ?

@megatolya

This comment has been minimized.

Copy link

megatolya commented Jan 10, 2018

@lejard-h
Unfortunately no. We need to have oppurtunity to render web forms in any place on the page. Not only on top of other content or on the separate page. Manually control scroll (to reposition webview) seems too complicated for us.

I understand that this issue is by-design problem but IMHO this feature is quite fundamental to ignore.

@pichillilorenzo

This comment has been minimized.

Copy link

pichillilorenzo commented Sep 15, 2018

Hey guys, I released the "InAppBrowser" plugin that works in both Android and iOS systems: https://github.com/pichillilorenzo/flutter_inappbrowser

This first release is just a porting of the popular cordova-plugin-inappbrowser in order to make it work with the Flutter API.. I'm working on it for updates!!

@MichaelSowah

This comment has been minimized.

Copy link

MichaelSowah commented Sep 16, 2018

@pichillilorenzo your plugin is not inline and this channel is about having the browser in line

@pichillilorenzo

This comment has been minimized.

Copy link

pichillilorenzo commented Sep 16, 2018

@MichaelSowah Yeah, I know that, thats why I wrote "I'm working on it for updates"! I will work also on that using AndroidView for Android and for iOS when it will be released

Edit: why the "thumbs down" emoji here? Give some explanation at least

@romatroskin

This comment has been minimized.

Copy link

romatroskin commented Oct 11, 2018

any updates for iOS?

@flddr

This comment has been minimized.

Copy link

flddr commented Oct 18, 2018

Can you explain why it is issued for years but we don't get anything of webviewin flutter itself? Isn't all about showing HTML, CSS and JS the biggest technology evolution since release of NCSA Mosaic? What is a technology (or a framework), called the future of app development, without web view? Isn't everything about Google the web? 😉

This is a point i do not understand

For example, inline webview means to have the power and UI of HTML, CSS and hopefully JS to display things like the web, like code in messages in gitter webapp, which isn't slack App capable of, including JS libs for syntax highlighting and so on.

The difference between other widgets and a webview is like between all the web and so called RichTextBoxes...

I see a gap between all that what's done in hybrids and a framework, like flutter, but, the power of a webview is nothing else than the power of browsers, of electron, of atom and VS Code, of all those things we are loving every day.

😕

@zoechi

This comment has been minimized.

Copy link
Contributor

zoechi commented Oct 18, 2018

@flddr Just because it is an important feature doesn't mean it is easy and quick to add. Rather the opposite.
You seem to assume that Google has unlimited resources and that adding enough additional developers to a team is enough to get instant results. Sadly that's not how the world works.

You can rest assured that the Flutter team is aware of this features importance and you can follow progress in https://github.com/flutter/plugins/tree/master/packages/webview_flutter

@flddr

This comment has been minimized.

Copy link

flddr commented Oct 18, 2018

@zoechi ups, thanks, i did never want to say this 😕

My guess was, it was dropped morely in development to hold a gap between hybrids and natives, because the flutter UI itself is enormous powerful and clean, whereas the possibility to do things in a webview can end in lower quality (like, miss of material design or those points). Because webview is often miss-used for all things (quick n dirty)

Thanks for the link

@zoechi

This comment has been minimized.

Copy link
Contributor

zoechi commented Oct 18, 2018

@flddr I think it's mostly that they don't want to rewrite a browser in Dart (for good reasons) and instead make native functionality available which required to implement additional capabilities for Flutter.
This capability became available recently and since then implementing webview is in progress.

https://pub.dartlang.org/packages/flutter_webview_plugin (community effort) is available since quite some time, but it had the disadvantage that it was always shown on top of Flutter widgets. For example opening a drawer menu opens it behind the webview if there is overlap.
The new plugin will work well with other Flutter widgets.

@flddr

This comment has been minimized.

Copy link

flddr commented Oct 18, 2018

@zoechi you are right - i have overseen a rewrite in dart completely. I just know flutter is the future of app development in my opinion, the tooling is great, dart is great - but i couldn't dive deep in because i am developing my backend actually. I am just looking flutter.io daily and waiting for 1.0 - and sometimes, this hopeful waiting causes a talk about whatever, the main thing is something is happening.

Sorry for miss-talk about the webview

Btw: sorry, i know about all you guys how are beeing google, and all your hard work, but, yes, you are google. Nothing else. My first contact with google was the last day i used altavista.

So, if i could bet on a company who would win a race, i ever would bet on google.

Thanks for infos :) I have nothing more to say for this issue :)

@Rockvole

This comment has been minimized.

Copy link

Rockvole commented Oct 18, 2018

Flutter uses Skia to render, and Chrome uses Skia to render so it seems like it should be an easy conversion. But you cannot add a browser into Flutter this way because any flutter apps would be banned from running on the apple store. Without cross platform ability Flutter would be abandoned. Google are right to take time with this issue.

https://www.howtogeek.com/184283/why-third-party-browsers-will-always-be-inferior-to-safari-on-iphone-and-ipad/

@flddr

This comment has been minimized.

Copy link

flddr commented Oct 18, 2018

@Rockvole very interesting 👍

@pichillilorenzo

This comment has been minimized.

Copy link

pichillilorenzo commented Oct 22, 2018

Finally I released a new version (v0.5.1) of flutter_inappbrowser where there is an initial support of inline WebViews (InAppWebView class)! Obviously, this Widget is available only for Android at this moment and there are some limitation because AndroidView is not stable enough.

However you can already play with it a little bit. There are a lot functions and events that you can test and use! An example of an inline WebView can be found in the README.md file of the plugin repository.

@imWildCat

This comment has been minimized.

Copy link
Contributor

imWildCat commented Nov 6, 2018

I am just curious: it is mentioned in Google Developer Days China (last month) that the official WebView plugin should be release with developer preview 2. However, this plugin webview_flutter is still in development: https://github.com/flutter/plugins/tree/master/packages/webview_flutter

@dnfield dnfield modified the milestones: bucket10, Overdue Nov 6, 2018

@amirh amirh modified the milestones: Overdue, bucket11 Nov 7, 2018

@InMatrix

This comment has been minimized.

Copy link

InMatrix commented Nov 8, 2018

@imWildCat Thank you for joining us at GDD China. To clarify, we demoed a preview of the WebView widget at GDD. I checked the video recording (55:12) of the GDD keynote to make sure we didn't say it's released. Nonetheless, we apologize that you were under the impression that this plugin had been released.

@imWildCat

This comment has been minimized.

Copy link
Contributor

imWildCat commented Nov 8, 2018

@InMatrix Sorry for my misunderstanding. Many thanks your explanation and I really appreciate it. I look forward to the release of the official WebView plugin.

@amirh

This comment has been minimized.

Copy link
Contributor

amirh commented Nov 10, 2018

flutter/plugins#890 added iOS support to the webview_flutter plugin.
The platform views embedding support, which the inline webview is based on, is still in early preview (see #19030 (comment) ).

Open issues are tagged with the platform-views and/or webview labels, please upvote the issues you care about to help us prioritize.

@amirh amirh closed this Nov 10, 2018

@amirh

This comment has been minimized.

Copy link
Contributor

amirh commented Nov 10, 2018

Note that if you want to try it out on iOS you will need to enable the preview flag, see more details on:
#19030 (comment)

@ZhennanWu

This comment has been minimized.

Copy link

ZhennanWu commented Nov 29, 2018

The absence of a usable WebView is really a deal-breaker to me personally.
flutter_inappbrowser is a great package that comes very close to full usability but still lacks keyboard support yet. Unfortunately, I was just going to build a code editor app........

@flddr

This comment has been minimized.

Copy link

flddr commented Dec 5, 2018

Congratulations to 1.0 for best mobile framework ever 🎉

Now waiting for webview ☺️

@amirh

This comment has been minimized.

Copy link
Contributor

amirh commented Dec 5, 2018

Just to clarify: The webview_flutter plugin provides an embedded WebView on Android and iOS and is currently in developers preview.

We are tracking issues and missing features with the webview tag, if you care about specific issues you can help by filing an issue if there's isn't one yet, or upvoting an existing issue. PRs are of course also welcomed 😄

@danielRi

This comment has been minimized.

Copy link

danielRi commented Dec 12, 2018

@amirh Sorry to hassle you with questions. We are heavily considering moving over to Flutter for a upcoming project, but we rely on a WebView to work (inline, flutter_webview_plugin is not an option). Do you have any information about upcoming updates or a roadmap for us? Thank you very much for any reply, keep up the great work and may the Flutter love spread around the world.

@zoechi

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment