我创建通知通道,以在
Android 8.0中显示通知,如下所示
NotificationChannel uploadChannel = new NotificationChannel(Constants.NOTIFICATION_CHANNEL_UPLOAD_ID,"Uploads", NotificationManager.IMPORTANCE_LOW);
uploadChannel.enableLights(false);
uploadChannel.setDescription("Uploads Channel");
notificationManager.createNotificationChannel(uploadChannel);
每当我显示通知手机振动很多次.
我从通知通道禁用振动,如下所示
uploadChannel.enableVibration(false);
我创建如下通知
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context, Constants.NOTIFICATION_CHANNEL_UPLOAD_ID);
但它不工作电话随着每个通知振动.