大佬教程收集整理的这篇文章主要介绍了Android – 在通知栏中保持通知稳定,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
private void showNotification() { CharSequence title = "Hello"; CharSequence message = "Notification Demo"; notificationmanager notificationmanager = (notificationmanager)getSystemservice(NOTIFICATION_serviCE); Notification notification = new Notification(R.drawable.icon,"A Notification",System.currentTimeMillis()); Intent notificationIntent = new Intent(this,Main_Activity.class); PendingIntent pendingIntent = PendingIntent.getActivity(this,notificationIntent,0); notification.setLatestEvenTinfo(Main_Activity.this,title,message,pendingIntent); notificationmanager.notify(NOTIFICATION_ID,notification); }
它的工作正常,但是即使用户按通知栏中的“清除”通知按钮,我们还能以什么方式将通知保持在通知栏?
请查看“雅虎”应用程序的通知栏.
我已经通过这个SDK文章:http://developer.android.com/guide/topics/ui/notifiers/notifications.html#Updating,但没有找到.
以上是大佬教程为你收集整理的Android – 在通知栏中保持通知稳定全部内容,希望文章能够帮你解决Android – 在通知栏中保持通知稳定所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。