Detailed explanation of notification and notificationmanger in Android

Android status bar reminder

Alertdialog can also be used as the reminder function in Android, but we should use it carefully, because when using alertdialog, the user's ongoing operation will be interrupted because the current focus is obtained by alertdialog. We can imagine that when the user is enjoying playing the game, a text message comes at this time. If an alert dialog is used to remind the user of the message at this time, the user must first handle the reminder before continuing the game. Users may be angry to death. The use of notification will not bring these troubles. Users can read this message after playing the game. Therefore, the appropriate control should be selected according to the actual needs in the development.

Steps:

1、 Add layout objects

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>