Reply
Thread Tools
Posts: 52 | Thanked: 40 times | Joined on Dec 2011
#1
I originally posted this in "Applications" and realized later that it would probably better suit development but so far no-one has moved it so I'm reposting.

I'm an EMT and I would like to make my phone behave differently when it receives an SMS from dispatch.

What do I mean by differently:
most important:
- vibrate & make noise longer then for normal sms'es and regardless of profile chosen
for later stages:
- display the message fullscreen until I acknowledge it or some timeout
- add an applet to say whether I'm on call or not to control the noise behavior.

My first instinct is that this may just tie in well with qtlockscreen however this should also happen when the phone is not locked.

So is there some API/event that allows me to know from who an sms was just received so I can implement these actions?

Thanks.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#2
You may want to check source code of package smscon, and scavenge how it's reacting to SMS from certain number with certain content. smscon is huge proram, but just this small piece of code should be sufficient as a base for Your needs, I think.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 1,086 | Thanked: 2,964 times | Joined on Jan 2010
#3
Originally Posted by Keeper of the Keys View Post
So is there some API/event that allows me to know from who an sms was just received so I can implement these actions?
Yes, you can use Qt Mobility for this. I use it in my silly SMSPetFeeder project to check through the message of each sms text received for the trigger word "Doggytreat". For the project I implemented a helper class to handle the sms messages, you can see the code I used in the 'making of' project video. You can use the same code as a starting point for your own project to intercept the SMS and do whatever you need with it.

Or you can just watch me feeding dogs with it here

Intercepting the sms messages will probably be the easiest bit, it's all the other stuff you want to do after that may be more tricky.
__________________
Follow me on my neglected twitter @kojacker

Cybot950 - Control a robot with your N9/N950
SMSPetFeeder - Build a Bluetooth/SMS dog feeder with Qt, N950, and arduino
Nerf950 - Use your N9/N950 to fire a Nerf gun

Last edited by kojacker; 2012-07-20 at 13:49.
 

The Following User Says Thank You to kojacker For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:16.