我已经阅读过通知文档和audiomanager。我遇到了adjustStreamVolume
方法和STREAM_NOTIFICATION
标记。我根本不理解的是,如果我想默默地通知用户,我应该如何应用这两种方法?假设我有以下通知:
notification = new NotificationCompat.Builder(getApplicationContext())
.setContentTitle(notification_title)
.setContentText(notification_text)
.setTicker("Notification!")
.setWhen(System.currentTimeMillis())
.setDefaults(Notification.DEFAULT_SOUND).setAutoCancel(true)
.setSmallIcon(R.drawable.ic_stat_name).build();
//and show with notification manager
adjustStreamVolume和STREAM_NOTIFICATION究竟适用于所有这些吗?