Android管理APIKiosk模式无通知声音
创始人
2024-10-08 03:31:41
0
  1. 在 Android 设备管理器中,创建一个 policy 然后将其分配给 Kiosk 设备。这个 policy 应该禁用所有的声音和振动。
Policy policy = new Policy();
policy.setName("Kiosk Mode Policy");
policy.setDisableStatusBar(true);
policy.setDisablePowerButton(true);
policy.setDisableVolumeButtons(true);
policy.setDisableSettings(true);
policy.setDisableStatusIcons(true);
policy.setDisableWiFi(true);
policy.setDisableBluetooth(true);
policy.setDisableCamera(true);
policy.setDisableNFC(true);
policy.setDisableLocationServices(true);
policy.setDisableScreenCapture(true);
policy.setDisableFactoryReset(true);
policy.setDisableSafeBoot(true);
policy.setDisablePasswordRequirement(true);
policy.setDisablePasswordExpiration(true);
policy.setDisableLogoutOnScreenOff(true);
policy.setDisableSound(true); // This line disables all sounds and vibrations
policy.setDisableVibration(true);
  1. 在应用程序中,通过 AudioManager 来关闭通知声音
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
audioManager.setStreamMute(AudioManager.STREAM_NOTIFICATION, true);

当需要恢复通知声音时,将第二个参数设置为 false 即可

audioManager.setStreamMute(AudioManager.STREAM_NOTIFICATION, false);

相关内容

热门资讯

免费测试版!aapoker透视... 此外,数据分析德州(约局吧德州真的有透视挂吗)辅助神器app还具备辅助透视行为开挂功能,通过对客户约...
必知教程!wepoker破解器... 1、必知教程!wepoker破解器,hhpoker必备开挂,玩家教程(有挂透明)(UU poker、...
玩家必知教程!wepoker透... 玩家必知教程!wepoker透视版下载,hardrock作弊,介绍教程(有挂技巧);致您一封信;亲爱...
攻略讲解!红龙poker辅助工... 攻略讲解!红龙poker辅助工具,pokernow辅助工具,黑科技教程(有挂技巧);玩家必备必赢加哟...
推荐几款新版!aa poker... 推荐几款新版!aa poker辅助,wepoker私人定制透视,解密教程(有挂技巧)关于wepoke...
一分钟秒懂!wepoker辅助... 一分钟秒懂!wepoker辅助是真的假的,wepoker透视脚本免费下载,力荐教程(有挂神器)关于w...
必看攻略!wepoker有透视... 必看攻略!wepoker有透视吗,竞技联盟透视,爆料教程(有挂教程)1、不需要AI权限,帮助你快速的...
盘点一款!wepoker私人局... 1、盘点一款!wepoker私人局辅助挂,agpoker辅助,解密教程(有挂教程);详细教程。2、w...
实测揭晓!线上德州的辅助器是什... 实测揭晓!线上德州的辅助器是什么,wepoker辅助器软件下载,高科技教程(有挂神器)1、不需要AI...
教学盘点!hhpoker有没有... 教学盘点!hhpoker有没有作弊挂,agpoker辅助,规律教程(有挂软件)关于hhpoker有没...