Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I would love to put together a quick toggle that would set my phone for my idea of "Night Mode". In other words it would turn off SMS Sounds (set the tone to None) and turn off Mail sounds. That way I am only disturbed if the phone rings.

I have looked at both the example code above, as well as BB's SDK and I'm just having trouble finding the prefs file and prefs that I need to modify.

Also to make it more generic, I would love to be able to record what the SMS Sound was so that the toggle can reset it to the previous setting when Night Mode is turned off.

Any and all help is appreciated.
 
I just wanted to say thanks to the OP for laying down the steps needed to code one of these. I have successfully created a toggle for the email notification sound/vibrate.

As an FYI to those who need a respring for their toggle to work, I had to use the scripting method mentioned in BigBoss guide to reload the mail app, otherwise the change wouldn't take effect until I went in and out of the application (or did a respring).
 
I would love to put together a quick toggle that would set my phone for my idea of "Night Mode". In other words it would turn off SMS Sounds (set the tone to None) and turn off Mail sounds. That way I am only disturbed if the phone rings.

I have looked at both the example code above, as well as BB's SDK and I'm just having trouble finding the prefs file and prefs that I need to modify.

Also to make it more generic, I would love to be able to record what the SMS Sound was so that the toggle can reset it to the previous setting when Night Mode is turned off.

Any and all help is appreciated.

There's an app in cydia called Auto Silent. It runs in the background and will put your phone in silent mode on a set schedule, ie, night mode. It's on a trial basis now, so free, but will soon ve a paid app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.