Android Notification使用方法总结一. 基本使用1.构造notification NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(a
Android Notification使用方法总结
一. 基本使用
1.构造notification
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(appContext) .setSmallIcon(appContext.getApplicationInfo().icon) .setWhen(System.currentTimeMillis()) .setAutoCancel(true)//当点击通知的时候会自动取消 .setContentTitle(contentTitle) .setTicker(notifyText)//状态栏提示 .setContentText(summaryBody) .setContentIntent(pendingIntent) .setNumber(notificationNum); Notification notification = mBuilder.build();
--结束END--
本文标题: Android Notification使用方法总结
本文链接: https://www.lsjlt.com/news/221208.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
2024-05-16
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0