非常久没有使用Android的通知功能了,今天把两年前的代码搬出来一看.发现非常多方法都废弃了,代码中各种删除线看的十分不爽.于是乎,打开Google,查看官方文档.学习最新的发送通知栏消息的方法. 本文中的代码均參照谷歌官方文档编写: http://developer.android.com/guide/topics/ui/notifiers/notifications.html 1.首先.获取系统的通知服务: NotificationManager nm = (NotificationMan…