的显示通知作为一项活动,而不是将其添加到状态栏:Android的 [英] Android: Display Notification as an activity instead of adding it to status bar

查看:83
本文介绍了的显示通知作为一项活动,而不是将其添加到状态栏:Android的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为一个新手到Android的发展和我想知道正确的方式来获得通知作为一项活动,而不是状态栏通知。

I m a newbie to android development and i wanna know a right way to get notification as an activity instead of statusbar notification.

需要明确的是,我想,而不是显示它添加到状态栏,屏幕上的通知。

To be clear, i wanna display an notification on screen instead of adding it to status bar.

推荐答案

在这种情况下,你不应该叫它通知。在Android中,通知是什么,在状态栏,并且用户可以处理她自己的闲暇结束。

In that case you shouldn't call it notification. In Android, a notification is something that ends up in the status bar and that the user can deal with at her own leisure.

这是活动将接管整个屏幕并强制用户立即处理。这是非常侵入性和用户可能会生气,除非你显示的信息是真是至关重要的。

An activity will take over the complete screen and force the user to deal with it immediately. That is very intrusive and users will likely get annoyed, unless the information you show is really crucial.

正确的行为是张贴通知,并把你的活动,当用户点击的通知,非常喜欢您的邮件客户端或电子邮件客户端。

The correct behaviour is to post a notification and bring up your activity when the user clicks on the notification, very much like your messaging client or email client.

其他选项造就了对话或烤面包机消息。进行对话的消息,用户将不得不进行交互走开,而一个烤面包机的消息将是可见的很短的时间,然后自动消失。

Other options are bringing up a dialogue or a toaster message. A dialogue is a message the user will have to interact with to go away, whereas a toaster message will be visible for a short time and then automatically disappear.

你或许能成为一个更具体一点你要提供给用户什么样的信息?

Maybe you could be a bit more specific about what sort of information you want to provide to the user?

这篇关于的显示通知作为一项活动,而不是将其添加到状态栏:Android的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆