急急急!求助各位大神,我的Notification怎么都没有办法显示,就一个最简单的显示都出不来,控制台也没有出现任何错误,下面是我的源代码,小白求教各位大神!!!
button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String id = "my_channel_01";
                String name="我是渠道名字";
                NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
                Log.v("MainActivity","12312");
                Notification notification = null;
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
                    NotificationChannel mChannel = new NotificationChannel(id, name, NotificationManager.IMPORTANCE_LOW);
                    Toast.makeText(MainActivity.this, mChannel.toString(), Toast.LENGTH_SHORT).show();
                    manager.createNotificationChannel(mChannel);
                    notification = new Notification.Builder(MainActivity.this,null)
                            .setChannelId(id)
                            .setContentTitle("5 new messages")
                            .setContentText("hahaha")
                            .setSmallIcon(R.mipmap.ic_launcher).build();
                } else {
                    NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(MainActivity.this,null)
                            .setContentTitle("5 new messages")
                            .setContentText("hahaha")
                            .setSmallIcon(R.mipmap.ic_launcher)
                            .setOngoing(true);
                    notification = notificationBuilder.build();
                }
                manager.notify(111123, notification);
            }
        });