ActiveNotifications

本文演示了如何利用Android M引入的通知API来显示应用程序当前的通知数量,并通过PendingIntent进行更新。通过按‘添加通知’按钮开始,了解如何在通知被取消时更新计数。

The NotificationManager can tell you how many notifications your application is currently showing. This sample demonstrates how to use this API that has been introduced with Android M. To get started, press the "add a notification" button. When a notification is being canceled, the count gets updated via a PendingIntent.

NotificationManager可以告诉你您的应用程序当前显示有多少条通知。此示例演示如何使用此API,它已经在Android M上推出了. 首先,请按“添加通知”按钮。当通知被取消,这个数值将通过PendingIntent更新。

 

代码下载 http://pan.baidu.com/s/1G8Kbk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值