![](/img/trans.png)
[英]Not show push notification (Firebase Cloud Message) on status bar when app is not running
[英]Not show notification in status bar if app is running
我正在實現一個使用發布通知服務的Android應用。 我只想在用戶關閉應用程序后顯示通知。 如果應用正在運行,是否可能不在狀態欄中顯示通知?
您可以解決:
您可以在應用程序啟動時(從應用程序)通知服務,以便它可以刪除Notification
實例。
同樣,當用戶關閉您的應用程序時,在明確完成當前活動之前,該應用程序將通知服務以再次顯示該通知。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.