在哪里设置setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,FALSE)在手机? [英] Where is the setting setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, false) in the phone?

查看:909
本文介绍了在哪里设置setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,FALSE)在手机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了与系统震动设置弄乱的应用程序。即,将它们关闭。

i made an app that messes with the system vibrate settings. namely, it turns them off.

AudioManager audioManager = (AudioManager)ctx.getSystemService(Context.AUDIO_SERVICE);
audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, AudioManager.VIBRATE_SETTING_OFF);
System.putInt(ctx.getContentResolver(), VIBRATE_IN_SILENT, 0);

我现在想知道,在那里我可以把振动手动重新开启。铃声震动设置可以在声音设置中找到,但如果是通知设置?在SMS的应用程序的设置仍对震动永远,但在收到短信时手机不振动了。可以此设置只可开启/关闭编程?

i wonder now, where i can turn the vibration manually back on. the ringer vibrate setting can be found in the Sound settings, but where is the notification setting? the setting in the SMS app is still on "vibrate always", but the phone does not vibrate anymore when receiving a text. can this setting just be turned on/off programmatically?

BTW:我使用的是Nexus One的采用Android 2.3.3

btw: i am using a Nexus One with Android 2.3.3

THX
西蒙

Thx Simon

推荐答案

所有你需要做的就是上面一样,除了集 AudioManager.VIBRATE_SETTING_OFF 来完全一样的东西 AudioManager.VIBRATE_SETTING_ON

All you have to do is the exact same thing you did above except set AudioManager.VIBRATE_SETTING_OFF to AudioManager.VIBRATE_SETTING_ON

这篇关于在哪里设置setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,FALSE)在手机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆