![]() |
Modify (mangle) incoming SMS messages?
HI everyone,
Mobilicity is my provider, and it doesn't support incoming Unicode messages yet. Instead, it displays each unicode character as a pair of characters from GSM 03.38. I want to write a bit of code to detect this and to display these messages as proper unicode on my phone. How do I intercept incoming SMS messages and modify their content? |
Re: Modify (mangle) incoming SMS messages?
Look into working with the dbus? I wish I knew too, I'd like to grep and less my messages but I don't think they're stored plaintext anywhere.
I don't actually know much about this but hope someone else can help |
Re: Modify (mangle) incoming SMS messages?
look how SMScon does it
|
Re: Modify (mangle) incoming SMS messages?
does SMScon modify the messages and reinsert them into the inbox? i'm looking for a solution to this. reason the operator i'm on sends missed call smses with the phone number of the person who called. problem is, it doesn't do a lookup against my phone book so i have no idea who's calling until i tap on the number.
i'm trying to write a bit of code to watch for incoming smses, grab the body of the sms, then check a few things like FROM and body of the text to figure out if it's in the right format before doing a phone book lookup and injecting the contact's name into the sms. |
Re: Modify (mangle) incoming SMS messages?
Listen on dbus for incoming txt message. Then read txt from inbox sqlite db, make changes then write it back to sql db.
|
Re: Modify (mangle) incoming SMS messages?
finally got around to writing the code in python. the aboe suggestion doesn't work. my dbus handler is called first before the sms is inserted into the sqlite db. i have to use time.sleep() to poll the db...not a good approach. any ideas anyone??
race condition problem. sigh. |
Re: Modify (mangle) incoming SMS messages?
Hi droll,
here is a small python example that uses the "NewEvent" signal from rtcom-eventlogger. This example reads incoming messages from the db and changes the messagetext to uppercase. BUT, the conversion app is listening on the "NewEvent" signal too, and it reads the message before you can change it. So you have to close and reopen the conversation app, to see the new updated text. Code:
import dbus, gobject |
Re: Modify (mangle) incoming SMS messages?
thanx nicolai! got your code patches into mine in 3 minutes and it works like a charm! danke danke :)
as for the conversation app issue, it is a small annoyance for the app i am writing. i have a theory on how to force it to refresh but since i'm new to python, it'll take me a while to hack something up. nevertheless, thanks again! |
Re: Modify (mangle) incoming SMS messages?
it's actually a small pet project that i did with a carry over history from the windows mobile 6 days. the script is mostly done and works quite well. but since you are on harmattan, i doubt it would work for you. sorry.
|
Re: Modify (mangle) incoming SMS messages?
Quote:
|
All times are GMT. The time now is 05:05. |
vBulletin® Version 3.8.8