Android 安卓7.0。将AudioManager模式设置为振动
这个问题涉及Android APK 24及以上版本,因为它适用于以前的版本。可以将模式设置为静默模式,如下所示:Android 安卓7.0。将AudioManager模式设置为振动,android,android-7.0-nougat,android-7.1-nougat,Android,Android 7.0 Nougat,Android 7.1 Nougat,这个问题涉及Android APK 24及以上版本,因为它适用于以前的版本。可以将模式设置为静默模式,如下所示: am= (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE); am.setRingerMode(AudioManager.RINGER_MODE_SILENT); 但是,它对振动不起作用: am= (AudioManager) getBaseContext().getSystemServic
am= (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE);
am.setRingerMode(AudioManager.RINGER_MODE_SILENT);
但是,它对振动不起作用:
am= (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE);
am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
我还尝试将它们设置为固定值(例如0和1)。如果有人能指出安卓牛轧糖的变化,我将不胜感激