Just get the content of the SMS and do a simple if/else check. If it is your
text then disable the sound using AudioManager something like this...
private static AudioManager audioManager;
@Override
public void onCreate() {
super.onCreate();
audioManager = (AudioManager)this.getSystemService(AUDIO_SERVICE);
...
}
private void disableNotifySound(String pTextToCheck) {
String _theString = "...something...";
if(pTextToCheck == _theString) {
audioManager.setStreamMute(AudioManager.STREAM_NOTIFICATION,
false);
} else {
audioManager.setStreamMute(AudioManager.STREAM_NOTIFICATION,
true);
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en