【发布时间】:2020-01-05 04:37:27
【问题描述】:
用 Flutter 编写的应用程序是否可以在封闭状态下在后台编写服务连续运行?
【问题讨论】:
用 Flutter 编写的应用程序是否可以在封闭状态下在后台编写服务连续运行?
【问题讨论】:
可以有几个包,例如:
https://pub.dev/packages/background_location
https://pub.dev/packages/android_alarm_manager(安卓)
但如果你想要更多控制,你可以创建一个原生服务并将其与 Flutter 连接起来,你必须了解 android 语言,如 java 或 kotlin 或 swift for iphone
在这篇文章中,您可以了解如何在 android 中创建服务:
How to create a service in Flutter to make an app to run always in background?
【讨论】: