简体   繁体   中英

Flutter: Android: How can i make unremovable local notification toolbar with some action button on it as shown in screenshot

在此处输入图像描述

i am seeking for an easy implementation and if it is possible without any extra package then it would be more helpfull

You need to use Services on Android side ( Official Documentation ).

In few words, foreground service starts in app background (it can be separate process, depends on your features and specifics). Service cannot be started and live on Android device silently to user (you starting service and you have few second to pin it to notification, otherwise the system kill it immediately), you need to create a notification and pin service to it. In service you can update your notification by some action (user interact with notification and you updating it) or by time (per minute update battery level status, for example).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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