简体   繁体   English

如何使用颤振在 android 设备锁定屏幕上访问应用程序?

[英]How to access app on an android device lock screen, using flutter?

I need to be able to access my App from lock screen after a timer I set goes off.在我设置的计时器关闭后,我需要能够从锁定屏幕访问我的应用程序。 So the user doesn't have to stress with unlocking the phone, just like with the system alarm app.因此,用户不必像使用系统警报应用程序一样为解锁手机而感到压力。

I'll try and answer, and see if i understand the question corretly.我会尝试回答,看看我是否正确理解了这个问题。


A system-alarm-app typically just uses a type of notification.系统警报应用程序通常只使用一种通知。

There are two main dependencias for this via Pub.Dev Awesome_Notifications and flutter_local_notifications - both work with andriod and IOS.通过 Pub.Dev Awesome_Notifications 和 flutter_local_notifications 有两个主要的依赖项 - 都适用于 andriod 和 IOS。 Both also comprensive documentation.两者也是全面的文档。 I believe you can use both packs, but i can see that ActionButton on notifications are highlighted for Awesome_Notifications.我相信你可以使用这两个包,但我可以看到通知上的 ActionButton 为 Awesome_Notifications 突出显示。

In your notification you can simply have a button either stopping or snoozing like with IOS.在您的通知中,您可以像使用 IOS 一样简单地设置一个停止或打盹的按钮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM