blog icon indicating copy to clipboard operation
blog copied to clipboard

Flutter: with HarmonyOS 2

Open hhstore opened this issue 4 years ago • 16 comments

related:

  • [x] #421
  • [x] #208

hhstore avatar Jun 03 '21 10:06 hhstore

华为鸿蒙 HarmonyOS 2 和 flutter:

华为鸿蒙 HarmonyOS 2:

  • 最近发布了 鸿蒙2, 有点真东西了.
  • 一句话评价: 华为用 Android 抄了一版 iOS. 还行.
  • https://consumer.huawei.com/cn/harmonyos/
  • https://zhuanlan.zhihu.com/p/377592665
  • https://www.zhihu.com/question/462807922

评价:

  • 客观讲, 鸿蒙2的完成度蛮高.
  • 总体上, 可以和 Android 一战, 有些东西.
  • 那就看未来开发者生态建设的情况了.
  • 利好开发者. 未来会有一大波移植建设.

鸿蒙 docs:

  • https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ui-java-overview-0000000000500404

flutter 如何支持 HarmonyOS?

  • 目前 flutter 官方, 还没有支持计划.
  • 看这里: https://github.com/flutter/flutter/issues/38437
  • 美团自己做了一个移植方案: https://tech.meituan.com/2021/01/22/flutter-in-harmonyos.html

flutter engine:

  • https://github.com/flutter/flutter/wiki/Custom-Flutter-Engine-Embedders

华为官方的一些 flutter 包:

  • https://pub.dev/publishers/developer.huawei.com/packages
  • 华为发布了不少 flutter 包. 这个就很有意思.
  • https://github.com/HMS-Core/hms-flutter-plugin

hhstore avatar Jun 03 '21 10:06 hhstore

1

hhstore avatar Jun 03 '21 10:06 hhstore

1

hhstore avatar Jun 03 '21 10:06 hhstore

1

hhstore avatar Jun 03 '21 10:06 hhstore

1

XinyueZ avatar Jun 04 '21 09:06 XinyueZ

1

liuhong1happy avatar Jun 08 '21 07:06 liuhong1happy

希望flutter能支持吧 那就完美了,直接打通多端

guopeng1994 avatar Jun 09 '21 12:06 guopeng1994

所以现在flutter app能适配鸿蒙吗?我知道emui是可以适配的,但是有个问题是,不能通过android studio access emui的文件:)

PeterTF656 avatar Jun 17 '21 01:06 PeterTF656

所以现在flutter app能适配鸿蒙吗?我知道emui是可以适配的,但是有个问题是,不能通过android studio access emui的文件:)

  • 手上没有装鸿蒙的手机, 如果鸿蒙如他宣传的那样, 正常运行 Android App.
  • 理论上运行使用 flutter build 的 Android App, 应该没有任何问题.
  • 但是这不是 flutter 原生支持, 对于鸿蒙OS 独有的 API, 理论上, 可以使用 FFI 或者 Method Channel方式, 调用.
  • 这个需要社区跟进, 或者华为官方自己做搬用工, 要看后续生态发展.

hhstore avatar Jun 18 '21 02:06 hhstore

所以现在flutter app能适配鸿蒙吗?我知道emui是可以适配的,但是有个问题是,不能通过android studio access emui的文件:)

  • 手上没有装鸿蒙的手机, 如果鸿蒙如他宣传的那样, 正常运行 Android App.
  • 理论上运行使用 flutter build 的 Android App, 应该没有任何问题.
  • 但是这不是 flutter 原生支持, 对于鸿蒙OS 独有的 API, 理论上, 可以使用 FFI 或者 Method Channel方式, 调用.
  • 这个需要社区跟进, 或者华为官方自己做搬用工, 要看后续生态发展.

我昨天半夜刚重金抢到了一只华为鸿蒙新机 打算收到后 立马就测测试试;华为牛逼!

PeterTF656 avatar Jun 18 '21 06:06 PeterTF656

希望flutter能支持吧 那就完美了,直接打通多端

理论上google和鸿蒙是竞争对手,估计是要打压的。。。

PeterTF656 avatar Jun 18 '21 06:06 PeterTF656

有意思的是众多 huawei flutter packages 中,我看了一个 https://pub.dev/packages/huawei_scan 的文档 https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/integrate-plugin-0000001054317976, 只有英文版的,中文版的 https://developer.huawei.com/consumer/cn/doc/development/HMS-Plugin-Guides/integrate-plugin-0000001054317976 没发布或者没翻译 😄 这些 packages 都集中在 https://github.com/HMS-Core/hms-flutter-plugin , 主要是 @fuatbakkal , @cagdasmer 贡献的

liudonghua123 avatar Jul 02 '21 01:07 liudonghua123

有意思的是众多 huawei flutter packages 中,我看了一个 https://pub.dev/packages/huawei_scan 的文档 https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/integrate-plugin-0000001054317976, 只有英文版的,中文版的 https://developer.huawei.com/consumer/cn/doc/development/HMS-Plugin-Guides/integrate-plugin-0000001054317976 没发布或者没翻译 😄 这些 packages 都集中在 https://github.com/HMS-Core/hms-flutter-plugin , 主要是 @fuatbakkal , @cagdasmer 贡献的

嗯. 这两位是华为海外的员工吧. 中文没翻译, 也很正常. 估计这个业务线, 归属海外的部门.

hhstore avatar Jul 02 '21 06:07 hhstore

有大佬们用过arcore吗?我发现arcore对华为手机只支持到p30,后面的机型就装不了,这怎么破。。求巨老指点;BTW Harmony OS 2 works perfectly with android app, at least in my case.

PeterTF656 avatar Jul 06 '21 02:07 PeterTF656

有大佬们用过arcore吗?我发现arcore对华为手机只支持到p30,后面的机型就装不了,这怎么破。。求巨老指点;BTW Harmony OS 2 works perfectly with android app, at least in my case.

  • 没用过 ARCore SDK. 不太了解这块.
  • Harmony OS 2 works perfectly with android app. 这个很赞. 你使用的是华为哪款手机?
  • 后续买个华为手机装鸿蒙, 验证一下Android app 支持情况, 顺便测试一下 flutter app 的支持体验.
  • 😄

hhstore avatar Jul 06 '21 03:07 hhstore

有大佬们用过arcore吗?我发现arcore对华为手机只支持到p30,后面的机型就装不了,这怎么破。。求巨老指点;BTW Harmony OS 2 works perfectly with android app, at least in my case.

  • 没用过 ARCore SDK. 不太了解这块.
  • Harmony OS 2 works perfectly with android app. 这个很赞. 你使用的是华为哪款手机?
  • 后续买个华为手机装鸿蒙, 验证一下Android app 支持情况, 顺便测试一下 flutter app 的支持体验.
  • 😄 hhh我的是mate x2,除了arcore不能用之外,其他都work,而且体验很棒。然后我发现华为有自己的ar环境,叫ar engine,可能后续只能用ar engine代替arcore了。

PeterTF656 avatar Jul 07 '21 03:07 PeterTF656