当我尝试运行通知时,没有任何弹出
private void pushNotification(String user)
{
// TODO Auto-generated method stub
Log.d("Service", "pushNotification");
Notification notification = new Notification.Builder(this)
.setContentTitle("Basic Notification ")
.setContentText("Basic Notification, used earlier").build();
notification.flags |= Notification.FLAG_AUTO_CANCEL;
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(0, notification);
}
- 是因为我没有它的图标吗?
- 我需要添加任何东西来推送通知吗?
- 另外,我想在单击通知时开始一项活动。我应该怎么办?