Notification noti = new Notification.Builder(context)
.setContentTitle("TITLE").setContentInfo("INFO")
.build();
notificationManager.notify(ID,noti);
Run Code Online (Sandbox Code Playgroud)
我从谷歌页面的样本有问题.我有异常NoSuchMethodError我不知道发生了什么,所以我使用旧的弃用方法与通知noti.setLatestEventInfo,但我敢肯定还有另一种解决方案.有任何想法吗?
android ×1