maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   work in progress: simple vertical sms app: vertsms (https://talk.maemo.org/showthread.php?t=51635)

ossipena 2010-05-13 04:10

Re: work in progress: simple vertical sms app: vertsms
 
just crossed my mind while trying to get holding backspace delete 1 chat per 0.x secs that would threading help with "T9" load times?
If I get that working, threading will be imported to the program so it can be used.

aspidites 2010-05-13 05:34

Re: work in progress: simple vertical sms app: vertsms
 
probably overkill. im going to play with it when i get home

jcompagner 2010-05-13 06:59

Re: work in progress: simple vertical sms app: vertsms
 
if there are still questions how to add the sms you type into conversations, WebTexter application, that sends sms over voip (betamax and the like), adds it to the conversation of the person you target just fine. Without any lag, at least i dont notice anything.

so maybe some can ask the coder of WebTexter? (it is written in C/QT i believe)

aspidites 2010-05-13 09:30

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by jcompagner (Post 656454)
if there are still questions how to add the sms you type into conversations, WebTexter application, that sends sms over voip (betamax and the like), adds it to the conversation of the person you target just fine. Without any lag, at least i dont notice anything.

so maybe some can ask the coder of WebTexter? (it is written in C/QT i believe)

This has already been implemented days ago, but thanks. ;-)

ossipena 2010-05-15 07:41

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by jcompagner (Post 656454)
if there are still questions how to add the sms you type into conversations, WebTexter application, that sends sms over voip (betamax and the like), adds it to the conversation of the person you target just fine. Without any lag, at least i dont notice anything.

so maybe some can ask the coder of WebTexter? (it is written in C/QT i believe)

the problem is with python. rtcom must be run with ctypes and the problem is defining ctypes arguments to the ctype functions.

so that probably doesnt help because I've looked many snippets in C that do the trick through already

e: and aspidites the way it is implemented isn't 100% errorproof. so it might get the el.db corrupted. so it would be nice to get official api working to get rid from the responsibility (and be able to get the app to extras eventually...)

ee: I'll forget about api way for now, it seems hopeless. I'll just add checking of database and possible attempts to fix it if it is corrupt. if people start reporting corrupt databases, I must consider the api way again...

zombiegavins 2010-05-15 10:00

Re: work in progress: simple vertical sms app: vertsms
 
how stable is the latest release of vertsms as i would love to start using it but i recently bricked my phone and had to reflash and i am trying to be cautious with what apps i install

gri 2010-05-15 12:49

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by ossipena (Post 659321)
the problem is with python. rtcom must be run with ctypes and the problem is defining ctypes arguments to the ctype functions.

so that probably doesnt help because I've looked many snippets in C that do the trick through already

e: and aspidites the way it is implemented isn't 100% errorproof. so it might get the el.db corrupted. so it would be nice to get official api working to get rid from the responsibility (and be able to get the app to extras eventually...)

ee: I'll forget about api way for now, it seems hopeless. I'll just add checking of database and possible attempts to fix it if it is corrupt. if people start reporting corrupt databases, I must consider the api way again...

If you can't access it smoothly from python, why not write a common maemo-python-helper lib which provides simple functions for python, written in c/c++?

aspidites 2010-05-15 15:47

Re: work in progress: simple vertical sms app: vertsms
 
@gri: That's what he's been talking about the entire time-- ctypes. The problem is that the rtcom API is obscure at best.

Specifically post #137 of this thread.

gri 2010-05-15 16:06

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 659731)
@gri: That's what he's been talking about the entire time-- ctypes. The problem is that the rtcom API is obscure at best.

Specifically post #137 of this thread.

I think you got me wrong. I meant: If accessing the rtcom-eventlogger with python would result in too much crappy code, it would be better to write a common library which makes python bindings or simple functions for that.

Something like:
insert_outbound_sms(name, number, text)

That would be easy to write in c and prettier to read in python.

aspidites 2010-05-15 16:25

Re: work in progress: simple vertical sms app: vertsms
 
@gri: If I understand you correctly, you are suggesting that we create an abstraction of rtcom in c and wrap that instead of raw rtcom?

Let me know when you're done :-)

[rant]This is why I'm looking forward to the Qt Mobility API [/rant]

gri 2010-05-15 17:17

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 659767)
@gri: If I understand you correctly, you are suggesting that we create an abstraction of rtcom in c and wrap that instead of raw rtcom?

Let me know when you're done :-)

[rant]This is why I'm looking forward to the Qt Mobility API [/rant]

Yes, QtMobility would be great but is currently not available. Also VertSMS uses gtk :( Otherwise (if it was c++), I'd be interested in merging the vertical code into my Web2SMS project to make one big flexible sms application for maemo.

The problem is, even if I create python bindings for rtcom-eventlogger, these would not work with PR 1.1 :( Currently the autobuilder links librtcom-eventlogger.so.1, which is PR 1.2.

PS: vertsms currently opens "/home/user/.rtcom-eventlogger/el.db". In PR 1.2 the file is "el-v1.db"!

aspidites 2010-05-15 22:29

Re: work in progress: simple vertical sms app: vertsms
 
[face palm] I know vertsms uses gtk [/face palm]

gri 2010-05-15 22:50

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 660097)
[face palm] I know vertsms uses gtk [/face palm]

I never had any doubt you don't know that. I just wanted to help but it seems you're not interested.

aspidites 2010-05-15 23:06

Re: work in progress: simple vertical sms app: vertsms
 
[rant]
@gri: You'll excuse me if I'm a bit agitated but your "help" seems to be suggesting things to be done that have either a) already been tried (ctypes) or b) aren't possible by your own admission or c) without any proof of how trivial it would be imply that it would be trivial when it isn't. If it were trivial it would have already been done. In the case that it is trivial and something obvious is being missing, patches are welcome.

This seems to have worked for me, qwerty12, and a few others. You have offered...what exactly?

Anyways, I'm sure I'm out of line, particularly because it's not my project, but I grow tired of some people suggesting implementations or features when they themselves haven't even offered any code. Hell, I even submitted a patch to a project I wasn't particularly interested in but seemed to be non-functional the other night (easyplayer).
[/rant]

Perhaps I'll say nothing more in these threads and continue to just submit patches....

gri 2010-05-15 23:55

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 660131)
[rant]
@gri: You'll excuse me if I'm a bit agitated but your "help" seems to be suggesting things to be done that have either a) already been tried (ctypes) or b) aren't possible by your own admission or c) without any proof of how trivial it would be imply that it would be trivial when it isn't. If it were trivial it would have already been done. In the case that it is trivial and something obvious is being missing, patches are welcome.

This seems to have worked for me, qwerty12, and a few others. You have offered...what exactly?

Anyways, I'm sure I'm out of line, particularly because it's not my project, but I grow tired of some people suggesting implementations or features when they themselves haven't even offered any code. Hell, I even submitted a patch to a project I wasn't particularly interested in but seemed to be non-functional the other night (easyplayer).
[/rant]

Perhaps I'll say nothing more in these threads and continue to just submit patches....

I didn't say it is trivial. I just wanted to point out that if it can't be done with pure python, an additional c-written library could be written. (which is not a great solution)
I've also already looked over the PyMaemo sources today to check how much work it would be to write rtcom-eventlogger bindings and submit them to PyMaemo.
But if I understand you right, you suggest me to just write the code without asking anyone here if it is needed/wanted???

PS: Before you're going to palm-face again: I know it currently does it's work with sqlite.

gri 2010-05-16 14:57

Re: work in progress: simple vertical sms app: vertsms
 
So here's my first python code I've ever written (and hopefully the last).

It currently hangs up in the line where the event is added to rtcom-eventlogger but I think this is because I don't understand ctypes. But maybe it helps someone.

The whole code in c is easy, but Python is horrible to me ...

frals 2010-05-16 16:47

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by gri (Post 660905)
So here's my first python code I've ever written (and hopefully the last).

It currently hangs up in the line where the event is added to rtcom-eventlogger but I think this is because I don't understand ctypes. But maybe it helps someone.

The whole code in c is easy, but Python is horrible to me ...

nice work, ive fixed the missing bits so its inserted in to the db now, enjoy :)

http://www.frals.se/maemo/rtcom.py

robertran88 2010-05-17 16:06

Re: work in progress: simple vertical sms app: vertsms
 
YOU NEED T9 typing 1 letter at a time is useless for the portrait mode!!!!!!!!!

mornage 2010-05-17 16:23

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by robertran88 (Post 662667)
YOU NEED T9 typing 1 letter at a time is useless for the portrait mode!!!!!!!!!

I'd hardly say it is useless as you clearly can still type. Useless would be not being able to type anything! Maybe you cannot type as fast as you would like, but you can still send SMS in portrait mode which is a great start and much more than you appear to have done! If you READ the announce thread (which is where things like this should go) you will see that this has been suggested and is being worked on.

E: typo

blubbi 2010-05-18 17:40

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by frals (Post 661038)
nice work, ive fixed the missing bits so its inserted in to the db now, enjoy :)

http://www.frals.se/maemo/rtcom.py

"gri" pointed me to this post and I just assimilated that code to use it with my tool www2sms

What shall I say the rtcom code works, but if the SMS is inserted into conversation, you can read the SMS but you cant open it. When you click on the inserted SMS nothing happens. So no way to delete it.

And in the Contact View of "Conversation" the letter symbol in front of the contacts name shows an exclamation mark in the top right corner.

Is this known? Any suggestions?

[EDIT]
gri just told me to remove the comment from the following line:

Code:

#rtcom.rtcom_el_add_header(el, eventId, 'message-token', str(uuid.uuid4()), None)
this did the trick. Thanks gri!
[/EDIT]


Cheers
Bjoern

ossipena 2010-05-18 18:57

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by robertran88 (Post 662667)
YOU NEED T9 typing 1 letter at a time is useless for the portrait mode!!!!!!!!!

your comment is useless.

if that is best you can do, stay away from vertsms threads please

aspidites 2010-05-18 19:06

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by gri (Post 660905)

NOW I'm impressed. Well done. (Not that you were trying to impress me at all). I'd recommend wrapping it up as a library as a lot of people will want to use it. (just a guess)

ossipena 2010-05-18 19:08

Re: work in progress: simple vertical sms app: vertsms
 
million thankses from rtcom -stuff!

I'll try to add it to master repo today.

I am waiting if someone is willing to fetch me dbus-log with 07xxx numbers that doesn't work.

I have been really busy recently so there hasn't been much happening lately. but I am going to add also sending to multiple contacts too asap

e: will push now the api way to add message to rtcom. seems to work perfectly and it doesn't btw need the own name: I just put "" to string value and it seems to work.

ossipena 2010-05-18 19:58

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 664671)
NOW I'm impressed. Well done. (Not that you were trying to impress me at all). I'd recommend wrapping it up as a library as a lot of people will want to use it. (just a guess)

just add it to PyMaemo wiki, there are already lot of good examples.

mornage 2010-05-19 10:47

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by ossipena (Post 664675)
I am waiting if someone is willing to fetch me dbus-log with 07xxx numbers that doesn't work.

Is this something I can help with? If so, how?

ossipena 2010-05-19 11:50

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by mornage (Post 665821)
Is this something I can help with? If so, how?

I got two dbus logs yesterday, but I was unable to see the difference between conversations and the dbus way vertsms uses.

you have a issue with 07 numbers? if you do, it is good to know and I will ask you to help if needed.

I am considering another way to send the message too.

but for now I got everything I need covered.

aspidites 2010-05-19 19:15

Re: work in progress: simple vertical sms app: vertsms
 
A few pages back someone explained the difference between how these numbers work ossipena. Also, there is a foreign sms helper program floating around somewhere. If I can find it, I'll update with links. Maybe it'll be useful.

mornage 2010-05-19 21:47

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by ossipena (Post 665907)
I got two dbus logs yesterday, but I was unable to see the difference between conversations and the dbus way vertsms uses.

you have a issue with 07 numbers? if you do, it is good to know and I will ask you to help if needed.

I am considering another way to send the message too.

but for now I got everything I need covered.

Yeah, all the numbers in my phone book start 07 and when I send messages with VertSMS I get an error saying the number must be 11 digits. It would be a pain to change all of my contacts to +44 just so I can use VertSMS so any help I can give just let me know.

ossipena 2010-05-20 07:30

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by aspidites (Post 666525)
A few pages back someone explained the difference between how these numbers work ossipena. Also, there is a foreign sms helper program floating around somewhere. If I can find it, I'll update with links. Maybe it'll be useful.

yes I remember that. Now all I have to do is figure out how to the app could work with both configurations at providers end.

and the most important part: without guessing country codes. one mistake could be pretty expensive there ;)

Chrome 2010-05-20 07:35

Re: work in progress: simple vertical sms app: vertsms
 
Is it possible at add arabic letters? maybe something like this:

http://img641.imageshack.us/img641/8737/78119054.png

ossipena 2010-05-20 10:09

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by Chrome (Post 667176)
Is it possible at add arabic letters? maybe something like this:

http://img641.imageshack.us/img641/8737/78119054.png

I have no idea.

but the code can be used freely if someone wants to find out by himself.

here is btw latest status report from my git branch:

http://talk.maemo.org/showpost.php?p...&postcount=125

MohammadAG 2010-05-20 10:15

Re: work in progress: simple vertical sms app: vertsms
 
Sorry, haven't been following this thread a lot, but are there any changes I should push to -devel? :)
(The bugtracker in the control file is a first obviously)

festivalnut 2010-05-20 10:25

Re: work in progress: simple vertical sms app: vertsms
 
@ ossi - i have the problem sending to domestic format numbers (eg 07- rather than +447- ) i have zero knowledge of coding but i would love to contribute to this project in some small way if i can. let me know if you want me to test some things. i'm happy enough to harass all my friends with unlimited texts, or just text myself all day if thats easier! :)

e: forgot to say vodafone uk on contract, if thats relevant.

ossipena 2010-05-20 10:57

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by MohammadAG (Post 667364)
Sorry, haven't been following this thread a lot, but are there any changes I should push to -devel? :)
(The bugtracker in the control file is a first obviously)

yes I intended to contact you a bit later today.

had small error while testing sending to multiple numbers:
1. used strip instead split. so 045xxxxx was converted to numbers:
0,4,5, x,x,x,x

2. forgot to put i=i+1 in while function that sends the message

:D

so my device has tried to send probably hundreds of messages (luckily I have 1000 free messages a month with my contract) to numbers like 0, 1, 2 etc

and "unable to send sms to xx" -notifications kept on going until today.

but finally got the test messages through and working so yes, you could build a new version to extras-devel. (just pushed a version that works again second ago)

changelog:
-message is written to conversations with api, not with sqlite anymore.
-multiple receivers can be added.
when inputting numbers with contact dialog, dialog must be opened once per number. if inputted with keys, * or # adds semicolon (;) that is the separator for multiple numbers for now.

mornage 2010-05-20 11:14

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by ossipena (Post 667406)
when inputting numbers with contact dialog, dialog must be opened once per number. if inputted with keys, * or # adds semicolon (;) that is the separator for multiple numbers for now.

ooooh, does that mean we no longer have to go to the address book to input numbers? That would be a work around for my 07 number issue as I can then just go to the beginning of the number and replace 07 with +44.

ossipena 2010-05-20 11:30

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by mornage (Post 667438)
ooooh, does that mean we no longer have to go to the address book to input numbers? That would be a work around for my 07 number issue as I can then just go to the beginning of the number and replace 07 with +44.

unfortunately no.

backspace deletes always the last number no matter where the cursor is. but that is under work too...

MohammadAG 2010-05-20 11:53

Re: work in progress: simple vertical sms app: vertsms
 
Got the source, question though, aren't .pyo files compiled pyc?
(i.e are the .py files needed in the binary? or would the .pyo files suffice (they will be in the source eitherway))

ossipena 2010-05-20 14:28

Re: work in progress: simple vertical sms app: vertsms
 
it is probably best to include py files if someone wants to modify the app.

and btw the latest push in gitorious now has logical backspace functionality... so mornage you can dl files from git and create an icon for it yourself if the newest push doesnt make it to next version yet.

InoHacker 2010-05-20 14:45

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by Chrome (Post 667176)
Is it possible at add arabic letters? maybe something like this:

http://img641.imageshack.us/img641/8737/78119054.png

Why not ?
I could add Russian.
Only I do not know the Arabian language and as it will be combined with PDU-format message

gri 2010-05-20 15:12

Re: work in progress: simple vertical sms app: vertsms
 
Quote:

Originally Posted by InoHacker (Post 667818)
Why not ?
I could add Russian.
Only I do not know the Arabian language and as it will be combined with PDU-format message

Can you tell me what you actually changed for the russian version? Only some strings or more?
Qt supports translations as well as Right-To-Left support, so it should be possible to make a version containing latin, russian and arabic languages?


All times are GMT. The time now is 20:52.

vBulletin® Version 3.8.8