咏柳,曼联 阿贾克斯 录像,2016mba国家线
///// 第一步:获取notificationmanager notificationmanager nm = (notificationmanager) getsystemservice(context.notification_service); ///// 第二步:定义notification intent intent = new intent(this, otheractivity.class); //pendingintent是待执行的intent pendingintent pi = pendingintent.getactivity(this, 0, intent, pendingintent.flag_cancel_current); notification notification = new notification.builder(this) .setcontenttitle("title") .setcontenttext("text") .setsmallicon(r.drawable.ic_launcher).setcontentintent(pi) .build(); notification.flags = notification.flag_no_clear; /////第三步:启动通知栏,第一个参数是一个通知的唯一标识 nm.notify(0, notification); //关闭通知 //nm.cancel(0);
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Android apk 项目一键打包并上传到蒲公英的实现方法
Android 自定义LineLayout实现满屏任意拖动功能的示例代码
android 限制某个操作每天只能操作指定的次数(示例代码详解)
Android 集成 google 登录并获取性别等隐私信息的实现代码
网友评论