How can I get rid of deprecated methods?
本问题已经有最佳答案,请猛点这里访问。
我无法使用API??级别19更改下面的方法。
1 2 3 | Notification notification = new Notification(icon, message, when); ...... notification.setLatestEventInfo(context, title, subTitle, intent); |
实际上我尝试了Notification.Builder,但是没有得到正确的输出,你们可以演示如何对以上2条语句使用Notification.Builder。谢谢。
来自http://developer.android.com/reference/android/app/Notification.html:
此方法已在API级别11中弃用。请改用Notification.Builder。