Rethinking Dart interoperability with Android

  Рет қаралды 15,473

Flutter

Flutter

Жыл бұрын

In the past, Flutter only supported integration with Android libraries through a message-based approach called platform channels. With a new command using JNI to bridge to Android system APIs, Flutter developers can easily access platform APIs without needing to use a platform channel or plugin. This session will dive deeper into how Dart automatically creates bindings for cross-language interoperation and demo how to call a Jetpack Library directly from Dart in a Flutter app.
Resources:
Java interop → goo.gle/3GilmDA
Full sample code → goo.gle/3KfwORI
Demo code → goo.gle/3KAvp9O
File issues and share feedback → goo.gle/3KU4V3a
Speakers: Mariam Hasnany, Hossein Yousefi
Watch more:
Watch all Flutter Sessions → goo.gle/IO23_flutter
Watch all the Technical Sessions from Google I/O 2023 → goo.gle/IO23_sessions
Watch more Mobile Sessions → goo.gle/IO23_mobile
All Google I/O 2023 Sessions → goo.gle/IO23_all
Subscribe to Flutter! → goo.gle/FlutterYT
#GoogleIO

Пікірлер: 29
@flutterdev
@flutterdev Жыл бұрын
Watch all Flutter Sessions → goo.gle/IO23_flutteryt_pin
@Arash7m
@Arash7m Жыл бұрын
Hossein Yousefi is so well spoken!
@noahr842
@noahr842 Жыл бұрын
I'm really glad to see this progress in this area. 🎉
@fodedoumbouya9731
@fodedoumbouya9731 Жыл бұрын
Wow 🎉🎉🎉🎉 Flutter is going far and deep 👏👏👏
@madurangakannangara
@madurangakannangara 9 ай бұрын
Excellent! There're much capabilities already in the Java space. The more we can use them through Dart, better/faster the applications would be able to ship to the customer!
@markthomas9181
@markthomas9181 Жыл бұрын
Wow this is so cool.
@techwithdipufrom0ton621
@techwithdipufrom0ton621 9 ай бұрын
Great great team of Flutter and Dart. I ❤ this community
@_yogeshsingh
@_yogeshsingh Жыл бұрын
amazing 🎉
@user-nu2nj7mf2z
@user-nu2nj7mf2z Жыл бұрын
very good
@sidhu-patil
@sidhu-patil 3 ай бұрын
Great 😃
@andreyrezende4221
@andreyrezende4221 Жыл бұрын
awesome feature
@user-mh4sz7yu1p
@user-mh4sz7yu1p Жыл бұрын
cool!
@MrUbervan
@MrUbervan Жыл бұрын
Tem diferença entre canal e a chamada plataforma ?
@daniyaldolare3782
@daniyaldolare3782 Жыл бұрын
Why didn't they use jnigen for the flutter camera plugin?
@mariamhasnany9052
@mariamhasnany9052 Жыл бұрын
JNIgen is still experimental and pigeon made sense for our rewrite for the camera plugin (we wanted to release with 3.10) to use CameraX api because it kept our implementation and architecture the same for the plugin used across multiple platforms. If Camera plugin was only for Android usage, JNIgen would have made more sense. As JNIgen becomes more stable we will do a better job of explaining when to use JNIgen vs pigeon vs method channels.
@user-kn5bn7cd5s
@user-kn5bn7cd5s 11 ай бұрын
its pretty confusing for native developer to write native code in dart
@dmitriykarbovskiy1790
@dmitriykarbovskiy1790 Жыл бұрын
Finally.
@PenguinCrayon269
@PenguinCrayon269 Жыл бұрын
what is the difference between platform channel and jnigen?
@mariamhasnany9052
@mariamhasnany9052 Жыл бұрын
with platform (method) channels you have to write both Dart code for the Android API and a bunch of platform-specific code for handlers to send a receive messages from dart to native. JNIgen automatically generates Dart bindings for Android APIs available in Java or Kotlin code. After generating the bindings, you can go ahead and call the API like any other Dart code without needing to write any handlers because the bindings do that for you.
@orjiemmanuel6442
@orjiemmanuel6442 Жыл бұрын
👏👏👏👏👏
@yogarelaxmusic8871
@yogarelaxmusic8871 9 ай бұрын
do you have any reference video for the pigeon to work with C++ library? couldn't find enough to understand better?
@inazumaeleven738
@inazumaeleven738 Жыл бұрын
will the final apk contain all the methods or only the ones that were used?
@uhossein
@uhossein Жыл бұрын
It will contain no classes/method by default in the release mode since they're all going to be tree-shaken. You will have to manually add the classes and methods you want to keep using proguard rules. We have an open issue to automatically generate the proguard rules in the future.
@bennguyen1313
@bennguyen1313 11 ай бұрын
Not sure the difference between a Flutter Plugin vs Package, but I'd like to make a Flutter Windows/Desktop application that can access peripherals via their DLL drivers/library. From what I've seen FFI/JNIGen , Pigeon, or platform-channels must be used, but not sure how. For example, the DLL exports functions that return pointers to structures (that in turn have enums and other structures as its member elements). Would love to see such a hello-world style Flutter (3.11?) application!
@AIGameMonster
@AIGameMonster Жыл бұрын
It would be great if you can call Compose directly and cross-platform. I didn’t find such an example code.
@gofudgeyourselves9024
@gofudgeyourselves9024 Жыл бұрын
Show an ios example with swift as well
@blekel
@blekel Жыл бұрын
Неужели случилась друидская магия и Android либы теперь можно использовать на iOS, десктопе и вебе? Но подождите, ведь на видео они запускают только Android эмулятор. Если это другой вариант, как можно написать код только для одной платформы, то я даже не знаю, смеяться над этим или плакать - это "грабли" для потери времени в самом чистейшем виде.
@saqqara6361
@saqqara6361 Жыл бұрын
Great, but how to include the other platforms like Windows, Mac, Linux, Web this way?
How to build a package in Dart
14:23
Flutter
Рет қаралды 17 М.
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 36 МЛН
Introducing Impeller - Flutter's new rendering engine
14:50
When, why, and how to multithread in Flutter
15:10
Flutter
Рет қаралды 62 М.
Getting started with Flutter on embedded devices.
3:30
Industrial Flutter
Рет қаралды 3,2 М.
Code Push for Android & iOS | Flutter Shorebird
25:46
HeyFlutter․com
Рет қаралды 15 М.
What’s New in Material Design
20:56
Material Design
Рет қаралды 46 М.
Bringing pattern matching to Dart
20:28
Flutter
Рет қаралды 38 М.
What's new in Dart and Flutter
39:05
Flutter
Рет қаралды 101 М.
Flutter, Dart, and Raspberry Pi
12:27
Flutter
Рет қаралды 36 М.
Java in 100 Seconds
2:25
Fireship
Рет қаралды 1,3 МЛН
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 3,6 МЛН
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,3 МЛН
8 Товаров с Алиэкспресс, о которых ты мог и не знать!
49:47
РасПаковка ДваПаковка
Рет қаралды 174 М.
Bluetooth connected successfully 💯💯
0:16
Blue ice Comedy
Рет қаралды 1,2 МЛН
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 971 М.
Мой новый мега монитор!🤯
1:00
Корнеич
Рет қаралды 126 М.
Лучший браузер!
0:27
Honey Montana
Рет қаралды 1 МЛН