maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [maemo5] tying an event to an sms from a specific sender (https://talk.maemo.org/showthread.php?t=85595)

Keeper of the Keys 2012-07-20 10:59

[maemo5] tying an event to an sms from a specific sender
 
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 2012-07-20 12:01

Re: [maemo5] tying an event to an sms from a specific sender
 
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

kojacker 2012-07-20 12:27

Re: [maemo5] tying an event to an sms from a specific sender
 
Quote:

Originally Posted by Keeper of the Keys (Post 1240210)
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 :D

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.


All times are GMT. The time now is 05:15.

vBulletin® Version 3.8.8