
07-31-2008, 03:22 PM
|
|
What's Jailbreak?
|
|
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
How to do alerts by number.
|
Hi all, I'm fighting this problem with OS 2.0 too.
It's easy to get the number out of the sms table so that you can selectively alert for particular senders. Change the command to:
sqlite3 /private/var/mobile/Library/SMS/sms.db 'select count(*) from message where flags=0 and address="xyz"'
where xyz is your number. For me, it's formatted as +447(...). You can find the number like so:
sqlite3 /private/var/mobile/Library/SMS/sms.db 'select address from message where text like "%TEST PHRASE%";'
Replace 'TEST PHRASE' with a word that you've put into a test SMS message. You'll get a list of numbers with that word. Select the one you'll be getting your important messages from and plug it in as xyz above.
Further, while there doesn't appear to be a vibrate utility yet, the Erica Utilities 'play' command works fine for sounds. It's installable through Cydia, just like sqlite3. This is what I'm using:
play /private/var/stash/Ringtones.4JvOkg/Alarm.m4r &
sleep 3
kill $!
This will play the 'alarm' sound for 3 seconds.
All of this works fine. The problem that I haven't solved yet is that I can't find a way to make the phone either not sleep or wake up at a given time. Even with launchd running the daemon properly, the phone will still sleep and that's that. I've tried it with launchd running a script that loops, simply running that looping script, and by having launchd run a script that checks once and exits. Nothing will keep the phone awake.
I've done a lot of searching and have not found a way to make the phone stay awake--even people doing apps at the UI level are having trouble. You can, if you're diligent about turning the phone off, turn off auto-locking any any number of previously mentioned methods will work, using the stuff I've just posted. But that's no fun!
|
|