Notices


Reply
Thread Tools
Posts: 73 | Thanked: 33 times | Joined on Nov 2010
#111
Originally Posted by sakya View Post
I made this just for fun.
Can you provide the source for this?

Last edited by jj0; 2011-02-09 at 11:51.
 
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#112
Source code are available on the "homepage" (there's not really a page).
http://www.assembla.com/code/smssend/subversion/nodes
 

The Following 2 Users Say Thank You to sakya For This Useful Post:
Posts: 37 | Thanked: 18 times | Joined on Apr 2010
#113
Thanks for getting back sakya! The only trouble I have is that without the -c option I have no record of the sms messages I send and with it it's not really command line only! I have also noticed that if I am viewing a conversation with a recipient and I send to that recipient with the -c option it brings up the dashboard. This means that the first sms I send brings up the conversation window and the second sends it away again (or at least means I have to tap it in the dashboard).
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#114
In case it helps, here is a bash snippet which adds a text message to the database. I don't know how safe it is, but it /does/ appear in the conversations window after some variable delay. I was planning to use this with my own SMS script but never quite finished the SMS part (I got stuck on sending >160-char texts).

Code:
# $number is like '+447123456789'

# the end bit of the number. this seems to be used in the group_uid field -- no idea what for
partialnumber=$(echo $number | sed -r 's/.*([0-9]{7})$/\1/')

# $message is the message
message=${message//\'/\'\'} #replace singlequotes with double-singlequotes for sqlite

# build query
query="insert into Events (service_id, event_type_id, storage_time, start_time, end_time, is_read, flags, bytes_sent, bytes_received, local_uid, local_name, remote_uid, free_text, group_uid, outgoing, mc_profile) values (3, 7, strftime('%s', 'now'), strftime('%s', 'now'), 0, 1, 0, 0, 0, 'ring/tel/ring', '<SelfHandle>', '$number', '$message', '$partialnumber', 1, 0);"
echo "$query" | sqlite3 $HOME/.rtcom-eventlogger/el-v1.db
 

The Following 3 Users Say Thank You to tremby For This Useful Post:
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#115
A direct insert in the db table doesn't seem the best way to me.
I'll look if there's some API to save a message.
Many thanks
 

The Following User Says Thank You to sakya For This Useful Post:
Posts: 37 | Thanked: 18 times | Joined on Apr 2010
#116
This in the wiki used to work for me and would sometimes add the message to the conversation window but it was never very reliable and no longer works for me.
 

The Following User Says Thank You to hutchinsfairy For This Useful Post:
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#117
The package is available in the Extras-devel repository
http://maemo.org/packages/view/smssend/

Btw I looked at the QtMobility APIs and it seems there's no way to save a message in the sent folder.
I think I'll use the db insert.
 
Posts: 53 | Thanked: 20 times | Joined on Jan 2010
#118
Yeah, I never claimed it wasn't messy! With a bit of testing maybe it'll turn out to be fine, maybe it won't.
 
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#119
I tried it and it seems to work fine.
 
Posts: 37 | Thanked: 18 times | Joined on Apr 2010
#120
Could I persuade you to add autosend to the -c option as well? It's nice to be able to send as user, over 160 characters and without risking simultaneous database writes (if I scheduled a text via alarmd with smssend)?
 
Reply


 
Forum Jump


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