NotificationManager manager= (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification=new NotificationCompat.Builder(MainActivity.this)
.setContentTitle("标題")//标題
.setContentText("内容")//内容
.setSmallIcon(R.mipmap.ic_launcher)//圖示
.build();
manager.notify(1,notification);