Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport inlining Android/iOS views #19030
Comments
amirh
self-assigned this
Jul 3, 2018
amirh
referenced this issue
Jul 5, 2018
Merged
Platform Views - Android and MethodChannel API, and implementation skeleton #5684
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rolurq
Jul 9, 2018
Also on this matter, this would be useful when embedding camera stream in an application.
rolurq
commented
Jul 9, 2018
|
Also on this matter, this would be useful when embedding camera stream in an application. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Jul 9, 2018
Contributor
For a camera stream you probably want to use a Texture widget directly.
The camera plugin is doing that for the device's cameras: https://pub.dartlang.org/packages/camera
|
For a camera stream you probably want to use a Texture widget directly. |
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 11, 2018
This was referenced Jul 11, 2018
added a commit
to amirh/engine
that referenced
this issue
Jul 13, 2018
amirh
referenced this issue
Jul 13, 2018
Merged
Introduce PlatformViewsService for controlling platform views. #19325
added a commit
to flutter/engine
that referenced
this issue
Jul 13, 2018
This was referenced Jul 17, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
benbucksch
commented
Jul 20, 2018
|
Do you guys need help here, in development? |
amirh
added
the
a: platform-views
label
Jul 20, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Jul 20, 2018
Contributor
@benbucksch contributions are welcomed, here are 2 issues you can look at: #19417 #19418.
Thanks!
|
@benbucksch contributions are welcomed, here are 2 issues you can look at: #19417 #19418. Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
yohom
commented
Jul 28, 2018
|
So far I've only found AndroidView, is there an IOSView? Thanks. @amirh |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Jul 28, 2018
Contributor
@yohom this is still work in progress, I started with the Android support.
I wouldn't even use AndroidView yet as it is incomplete and unstable.
|
@yohom this is still work in progress, I started with the Android support. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
morad00
commented
Jul 31, 2018
|
Looks good! hope much support from flutter team |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
newbie-gk
Aug 9, 2018
Would absolutely love this feature :)
Any plans on when will this be available?
newbie-gk
commented
Aug 9, 2018
|
Would absolutely love this feature :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tiagofalves
Aug 9, 2018
Hi @amirh, first of all, a big thank you. If you need help with testing the features i can help.
tiagofalves
commented
Aug 9, 2018
|
Hi @amirh, first of all, a big thank you. If you need help with testing the features i can help. |
Hixie
added this to the bucket10 milestone
Aug 21, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Aug 27, 2018
Contributor
Basic support for embedding Android views has landed in master, the API shouldn't be considered stable yet.
There are still open issues, notably no keyboard support(#19718).
Note that Flutter widgets should be preferred over embedded Android views when possible.
|
Basic support for embedding Android views has landed in master, the API shouldn't be considered stable yet. Note that Flutter widgets should be preferred over embedded Android views when possible. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
levrik
Aug 28, 2018
Contributor
@amirh Where can I find documentation? I would like to play with it a bit.
|
@amirh Where can I find documentation? I would like to play with it a bit. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Aug 28, 2018
Contributor
Dartdoc for master is here: https://master-docs-flutter-io.firebaseapp.com/flutter/widgets/AndroidView-class.html
|
Dartdoc for master is here: https://master-docs-flutter-io.firebaseapp.com/flutter/widgets/AndroidView-class.html |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rolurq
commented
Aug 28, 2018
|
@amirh Any report on iOS progress will be great |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
We're working on it, don't have any time estimates... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tiagofalves
Aug 28, 2018
@amirh Any instructions on how to use this to actually display the inline map?
tiagofalves
commented
Aug 28, 2018
|
@amirh Any instructions on how to use this to actually display the inline map? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Aug 28, 2018
Contributor
There's a PR up for review (flutter/plugins#743) that ports google_maps_flutter to use an embedded Android view.
All of this is very experimental at this stage.
|
There's a PR up for review (flutter/plugins#743) that ports google_maps_flutter to use an embedded Android view. All of this is very experimental at this stage. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
yohom
Aug 29, 2018
How to respond to events at the dart end, for example, with the zoom in and zoom out buttons in a MapView? I tried AndroidView with some MapView(native view) and it looks like a static image right now, unable to respond to native view events. @amirh
yohom
commented
Aug 29, 2018
|
How to respond to events at the dart end, for example, with the zoom in and zoom out buttons in a MapView? I tried AndroidView with some MapView(native view) and it looks like a static image right now, unable to respond to native view events. @amirh |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Aug 29, 2018
Contributor
Communication with the dart code can be done over method channels or message channels. You can check flutter/plugins#743 for an example.
|
Communication with the dart code can be done over method channels or message channels. You can check flutter/plugins#743 for an example. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kbz066
commented
Aug 31, 2018
•
|
To what extent? @amirh |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
amirh
Aug 31, 2018
Contributor
|
I'm not sure I understand your question...
…On Thu, Aug 30, 2018, 8:57 PM kbz066 ***@***.***> wrote:
To what extent?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19030 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-gdThzP-Vpuva3eQREBG4Ny6hv8eMEks5uWLRAgaJpZM4VAOac>
.
|
zoechi
referenced this issue
Sep 1, 2018
Open
drawercontroller stop at tint screen on both open and close drawer #21272
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
felangel
Sep 8, 2018
For anyone who is looking for a simple example, I wrote a short article on how to use AndroidView at https://medium.com/@felangelov/flutter-platformview-how-to-create-flutter-widgets-from-native-views-366e378115b6
felangel
commented
Sep 8, 2018
|
For anyone who is looking for a simple example, I wrote a short article on how to use AndroidView at https://medium.com/@felangelov/flutter-platformview-how-to-create-flutter-widgets-from-native-views-366e378115b6 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
romatroskin
commented
Sep 16, 2018
|
really waiting for this feature to inline YouTube player :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
cosminstoinescu
Sep 17, 2018
I want to use the inline map on an Android device(Samsung S4). Because my Google Play service is not up to date, on the screen appeared the Update button. When clicking it the following error is thrown:
W/GooglePlayServicesUtil( 8663): Google Play services out of date. Requires 12451000 but found 11975238
D/ViewRootImpl( 8663): ViewPostImeInputStage ACTION_DOWN
D/AndroidRuntime( 8663): Shutting down VM
E/AndroidRuntime( 8663): FATAL EXCEPTION: main
E/AndroidRuntime( 8663): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
E/AndroidRuntime( 8663): at android.app.ContextImpl.startActivity(ContextImpl.java:1610)
E/AndroidRuntime( 8663): at android.app.ContextImpl.startActivity(ContextImpl.java:1597)
E/AndroidRuntime( 8663): at android.content.ContextWrapper.startActivity(ContextWrapper.java:337)
E/AndroidRuntime( 8663): at android.content.ContextWrapper.startActivity(ContextWrapper.java:337)
E/AndroidRuntime( 8663): at com.google.android.gms.dynamic.zze.onClick(Unknown Source)
E/AndroidRuntime( 8663): at android.view.View.performClick(View.java:5197)
E/AndroidRuntime( 8663): at android.view.View$PerformClick.run(View.java:20926)
E/AndroidRuntime( 8663): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 8663): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 8663): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime( 8663): at android.app.ActivityThread.main(ActivityThread.java:5951)
E/AndroidRuntime( 8663): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8663): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 8663): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
E/AndroidRuntime( 8663): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
cosminstoinescu
commented
Sep 17, 2018
|
I want to use the inline map on an Android device(Samsung S4). Because my Google Play service is not up to date, on the screen appeared the Update button. When clicking it the following error is thrown: W/GooglePlayServicesUtil( 8663): Google Play services out of date. Requires 12451000 but found 11975238 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
v7lin
Sep 29, 2018
I don't think this is a good solution.If you open 10 WebView, the memory will reach 1Gb.
v7lin
commented
Sep 29, 2018
|
I don't think this is a good solution.If you open 10 WebView, the memory will reach 1Gb. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
benbucksch
Sep 29, 2018
@v7lin : If you know a better solution, please feel free to go ahead, file a new ticket, describe it there, and implement it yourself.
I think amirh deserves a lot of thanks for implementing this at all. And even for free.
benbucksch
commented
Sep 29, 2018
•
|
@v7lin : If you know a better solution, please feel free to go ahead, file a new ticket, describe it there, and implement it yourself. I think amirh deserves a lot of thanks for implementing this at all. And even for free. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
v7lin
Sep 29, 2018
@benbucksch Sorry! I'not good at english.
对于上述评论,我表示歉意,我并无指责之意,那是我用了翻译工具翻译的英文。事实上,我也一直在研究如何在Flutter里内联WebView,一个多月的时间内,尝试了很多方案,然而却无法解决WebView内存消耗问题。而且我很佩服 @amirh ,他居然能想到用 Presentation 和 Texture 解决视图内联功能。
translate.google.com
I apologize for the above comments. I have no blame. It is English that I translated using translation tools. In fact, I have been researching how to inline WebView in Flutter. I have tried many solutions in a month, but I can't solve the WebView memory consumption problem. And I admire @amirh, he can actually think of using the Presentation and Texture to solve the view inline function.
v7lin
commented
Sep 29, 2018
•
|
@benbucksch Sorry! I'not good at english. translate.google.com
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
benbucksch
commented
Oct 1, 2018
•
|
@v7lin: Thanks :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JTorrus
commented
Oct 3, 2018
|
Is there any progress with Google Maps on iOs? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
behinenet
commented
Oct 6, 2018
|
We all need Google Maps on iOs too, please consider |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
phuongdt8x
Oct 8, 2018
Thank for bring Google Map inline on Android. I'm waiting on iOS too for production application. Right now I still use old version of library to run-able Google Map on iOS, however it will be develop on two different branches. So is there any progress would be so great.
phuongdt8x
commented
Oct 8, 2018
|
Thank for bring Google Map inline on Android. I'm waiting on iOS too for production application. Right now I still use old version of library to run-able Google Map on iOS, however it will be develop on two different branches. So is there any progress would be so great. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JTorrus
Oct 8, 2018
I'm in a similar situation, I'm working on an app and it needs to display a Google Map on both platforms. I had to change a bit the structure and use another Maps library to make it work on iOs. I hope we have good news soon because I don't like the idea of using different libraries to accomplish this functionality.
JTorrus
commented
Oct 8, 2018
•
|
I'm in a similar situation, I'm working on an app and it needs to display a Google Map on both platforms. I had to change a bit the structure and use another Maps library to make it work on iOs. I hope we have good news soon because I don't like the idea of using different libraries to accomplish this functionality. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Conghdos
Oct 9, 2018
Tôi đang ở trong tình huống tương tự, tôi đang làm việc trên một ứng dụng và nó cần hiển thị Google Map trên cả hai nền tảng. Tôi đã phải thay đổi một chút cấu trúc và sử dụng một thư viện Maps khác để làm cho nó hoạt động trên iOs. Tôi hy vọng chúng tôi có tin tốt sớm vì tôi không thích ý tưởng sử dụng các thư viện khác nhau để thực hiện chức năng này.
@JTorrus
I also have the same problem as you.
Can you tell me the solution on your IOS?
Thank you!
Conghdos
commented
Oct 9, 2018
@JTorrus |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
JTorrus
Oct 9, 2018
Tôi đang ở trong tình huống tương tự, tôi đang làm việc trên một ứng dụng và nó cần hiển thị Google Map trên cả hai nền tảng. Tôi đã phải thay đổi một chút cấu trúc và sử dụng một thư viện Maps khác để làm cho nó hoạt động trên iOs. Tôi hy vọng chúng tôi có tin tốt sớm vì tôi không thích ý tưởng sử dụng các thư viện khác nhau để thực hiện chức năng này.
@JTorrus
I also have the same problem as you.
Can you tell me the solution on your IOS?
Thank you!
My app has a TabBar with two pages: One displays the Google Map and the other one displays a ListView. Google Maps for Flutter supports the Widget hierarchy so you can put it inside a Scaffold or whatever Widget you want.
For iOs I had to use Map_View, works Ok but does not respect the Widget hierarchy of Flutter. You have to call a function for displaying the map when an event happens (e.g. onTap parameter in a button). Then my decision was to delete the TabBar and show just a ListView with a FloatingActionButton that displays the map in fullscreen when pressed.
JTorrus
commented
Oct 9, 2018
My app has a TabBar with two pages: One displays the Google Map and the other one displays a ListView. Google Maps for Flutter supports the Widget hierarchy so you can put it inside a Scaffold or whatever Widget you want. For iOs I had to use Map_View, works Ok but does not respect the Widget hierarchy of Flutter. You have to call a function for displaying the map when an event happens (e.g. onTap parameter in a button). Then my decision was to delete the TabBar and show just a ListView with a FloatingActionButton that displays the map in fullscreen when pressed. |
amirh commentedJul 3, 2018
A generic solution for embedding any Android/iOS view as part of the Flutter widget hierarchy would enable some highly desired features including Google Maps (#73) and WebView (#730).