maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   SMS counter for N900? (https://talk.maemo.org/showthread.php?t=38364)

ashyk36 2009-12-25 01:27

SMS counter for N900?
 
is there an sms counter for a n900?

God 2009-12-25 02:10

Re: SMS counter for N900?
 
nope but did you know that the 900 in "n900" represents the 900 fails it has?


hahahahah i jok! i jok!




Nah...it really does o.O

ashyk36 2009-12-25 10:54

Re: SMS counter for N900?
 
huh im confused.so really it doesnt?is there not an app for this?

pycage 2009-12-25 16:53

Re: SMS counter for N900?
 
Nobody did one yet, as fas as I know. But it shouldn't be too hard ("select count(*) from..." on the sqlite db). There just has to be found a volunteer developer. :)

psiho 2010-01-18 18:02

Re: SMS counter for N900?
 
im lookong forward for such an app myself...

hartti 2010-01-18 19:57

Re: SMS counter for N900?
 
@psiho, @ashyk36

as pycage mentions this is quite easy to do, but I am just wondering what would this application be for in a little more detail?
Do you like to count all SMS messages on the device (both received and sent), count only received (or sent), limit count for the past/current month, etc..

Providing a little more information would help here (in case someone interested to do a small project on N900 is reading this thread :-)

Hartti

j.s 2010-01-19 05:40

Re: SMS counter for N900?
 
Quote:

Originally Posted by pycage (Post 441450)
Nobody did one yet, as fas as I know. But it shouldn't be too hard ("select count(*) from..." on the sqlite db). There just has to be found a volunteer developer. :)

The application announced in http://talk.maemo.org/showthread.php?t=37907 is still in early stages, but it shows a lot of promise.

I think the author started out to make a backup of the event log database and started adding summary features.

psiho 2010-01-25 17:17

Re: SMS counter for N900?
 
i think just a simple counting app would be apropriate. like the call timer, or 'personal dataplan monitor'... counting sent messages, the received messages and all together:)

hartti 2010-01-29 08:14

Re: SMS counter for N900?
 
1 Attachment(s)
Are you talking about something like this?

Attachment 6590

Yes, ugly as hell...
FWIW that's a short python script (which took me ages, as I am just learning this :-)

I have not yet:
  • packaged it (I have PyPackager installed, so I should be able to tackle this one...)
  • sorted out how I recalculate the counters when the month changes (after which I will also remove the "update" button) - now the widget only updates when you send or receive an SMS
  • spent too much time on the UI (should I use bolded characters somewhere, etc) - but safe to say I am not planning to make this too cool looking (use of partial transparency and all that, unless I suddenly become much more productive in python scripting :-)
  • tested it on any other device than my own very hacked version (to make sure it works ok on more than one device, and does not break anything)
  • placed this available in anywhere

Hartti

fraaaaanka 2010-01-29 11:57

Re: SMS counter for N900?
 
Good work...
**suggestion**
when you say
sorted out how I recalculate the counters when the month changes
you should add an option to set the date of the month it resets as my text message allowance starts on the 21st of the month and i'm sure other peoples starts of different days of the month.
or
just add a manual reset button (but date set would be nicer as its automatic then)

nice one

dof250 2010-01-29 12:00

Re: SMS counter for N900?
 
THATS PERFECT!!

not ugly at all.. please upload something installable.. looks very nice!

hartti 2010-01-29 17:22

Re: SMS counter for N900?
 
Quote:

Originally Posted by fraaaaanka (Post 500756)
you should add an option to set the date of the month it resets as my text message allowance starts on the 21st of the month and i'm sure other peoples starts of different days of the month.

Oh, crap :-)

For that I would need a settings dialog. Ok. Have to check that out.

Hartti

JonWW 2010-01-29 17:44

Re: SMS counter for N900?
 
Quote:

Originally Posted by hartti (Post 501277)
Oh, crap :-)

For that I would need a settings dialog. Ok. Have to check that out.

Hay Ho - Well at least you have got some good feed back even if they are demmanding. You could allways release the app with basic functions once you feel it's ready (remember allways leave them wanting more), and then people can look forward to getting updates.

hartti 2010-01-29 19:22

Re: SMS counter for N900?
 
JonWW, you are right, I should not sit on top of this for too long.

The two things I need to do before putting any version out there are
1. package it
2. test it with on another N900 to see that it works correctly (at least on 2 devices)
All the rest - settings, timed recalculations,etc. - will come later

I think I might have enough time over to weekend to accomplish the first 2 steps :-)

Hartti

nex 2010-01-29 22:22

Re: SMS counter for N900?
 
I know it's probably not optimal, but what about a oneliner command for Desktop Execution Widget? Since that one already has its windowing and settings done. It could be added as a oneliner ie:

Code:

sqlite3 /home/user/.rtcom-eventlogger/el.db "select  CASE event_type_id WHEN 7 THEN 'In' WHEN 8 THEN 'Out' END, count(id) from Events where event_type_id in (7,8) AND strftime('%Y%m', storage_time, 'unixepoch') = strftime('%Y%m', 'now') group by strftime('%Y-%m', storage_time, 'unixepoch'), 1;"
This will give the in/out counts for the current month:
In|443
Out|104

grumps312 2010-01-29 22:30

Re: SMS counter for N900?
 
im looking forward to this app, it would be really useful for me as i have a limit on how many sms i can send per month. thanks in advance, hope it comes out soon! :)

bubbbbbz 2010-01-29 22:44

Re: SMS counter for N900?
 
nice work to keep track on ur contract txtes.. cud disbe dun for ur calls? show u ur moniutes may i reminder wen ur on ur las txt or minute :)

hartti 2010-01-29 23:46

Re: SMS counter for N900?
 
@nex, nice work with the sql and desktop execution widget, I did not know about the 'WHEN' trick. Have to work on my SQL skills more, I guess...

@bubbbbbz, I did not see call lengths being recorded in the eventlogger database. I could be wrong though.
The way to do this is through USSD commands. Maybe there is a cool one-liner as well to do this through dbus, I do not know. More info (?) here https://bugs.maemo.org/show_bug.cgi?id=5357.

Hartti

hartti 2010-02-01 23:38

Re: SMS counter for N900?
 
quick update on the SMS counter widget.

I ran to an issue over the weekend. Packaging worked fine and I was able to install the sms counter widget on another device. However the widget showed only zeroes in the UI for that another device. Not very helpful...

I'll include the widget in here as soon as I understand what is wrong with it. Sorry for the delay :-(

I have also created a garage project for this so that I can get this stuff to extras-devel at one point to allow easier updates.

Hartti

psiho 2010-02-02 17:43

Re: SMS counter for N900?
 
nice! i like it very much.:)

you can make it even simpler by adding a headbar which says 'sms counter' and thus you gain more place and beneath that can only 'sent', 'received' and 'total' be stated.

hartti 2010-02-05 00:29

Re: SMS counter for N900?
 
1 Attachment(s)
Tackling the installer dependencies took a little time, here is the package.

I did not make any changes in the UI, I just wanted to get this first test version out. next step is to get this in the maemo repository, make the suggested UI enhancement and allow the user to change the counter period change date...

Features:
Displays total count of SMS messages (both sent and received) and count of the SMS messages for the current month. The counters are updated every time a SMS is sent or received. Update button updates the counters also, but in general you should not need to use it, it is there for just my testing purposes (I will get rid of it in the future :-)

to install
(you need to be able to gain root access for example through root) - and note the as this is early, very untested version of the application and working with command line commands could be potentially dangerous for your device, please be careful, know what you do with the command line commands and backup the device before installing...

copy the file on the device
In xterm and as root, go to the folder you saved the file in
dpkg -i smswidget_0.1.0-1_armel.deb
If you get any error messages (for example if you have not installed any python applications or python desktop widgets before) try to fix the dependencies with
apt-get -f install
After successful installation you should see the widget on the home screen, if not, reboot the device. If still nothing, please report to me...

Hartti

aman18narang 2010-02-05 16:06

Re: SMS counter for N900?
 
this is such an helpful app for me as i get monthly 350 free msgs n usualy loose count of how many am done with..i so much wanted to help you test this pckg but am a complete zero with linux command line and deb packages..i think i'll just keep following this thread to tell there r so many ppl waiting for this thing to come out!! :)

charbar 2010-02-05 18:07

Re: SMS counter for N900?
 
awesome! thanks so much dude!!! it worked perfectly :) no problems with the install, appears on the desktop, and seems pretty accurate!

anapospastos 2010-02-06 19:25

Re: SMS counter for N900?
 
Well done for your work:) keep going dude

emortal 2010-02-10 11:46

Re: SMS counter for N900?
 
Can't wait to see this in Extras-Devel. Looks like a cracking widget

peternl 2010-02-15 10:37

Re: SMS counter for N900?
 
hi,
Ive used the sms counter for some days now. works great.

but when you sent messages longer then 1 sms, it'll count it as 1!

still many thanks for the app! hope you can get this error out of the way!

Soap77 2010-02-15 11:41

Re: SMS counter for N900?
 
Great app.
I really don't have much use for it. ( I have free SMSīs)
Itīs on a fun-to-know- basis.

hartti 2010-02-15 18:15

Re: SMS counter for N900?
 
"but when you sent messages longer then 1 sms, it'll count it as 1!"

Oh... but of course. I am getting the number from the database which stores even long sms messages as one entry only. My bad.

I guess I can check the total message length in the database and calculate the real number of messages using that additional piece of information.

Does anyone have information on the multi-part SMS length numbers?
I know one message is 160 7-bit characters. But at what point does the 2 messages (for one long message) become 3 messages (and so on)?

Next version should be in the extras-devel repository this week. I'll fix at least this and hopefully I can also add a settings panel to change the period start day.

Hartti

peternl 2010-02-16 00:38

Re: SMS counter for N900?
 
Quote:

Originally Posted by hartti (Post 527818)
"but when you sent messages longer then 1 sms, it'll count it as 1!"

Oh... but of course. I am getting the number from the database which stores even long sms messages as one entry only. My bad.

I guess I can check the total message length in the database and calculate the real number of messages using that additional piece of information.

Does anyone have information on the multi-part SMS length numbers?
I know one message is 160 7-bit characters. But at what point does the 2 messages (for one long message) become 3 messages (and so on)?

Next version should be in the extras-devel repository this week. I'll fix at least this and hopefully I can also add a settings panel to change the period start day.

Hartti

will you marry me? :D

Soap77 2010-02-16 07:19

Re: SMS counter for N900?
 
Hartti
Dont know if this information is to any avail:
1st SMS is 160 characters long
2nd 146
3rd 153
4th 153
5th 153
6th 153

hartti 2010-02-16 21:04

Re: SMS counter for N900?
 
Soap77,
Thanks, that confirms my understanding that after SMS message gets longer than 160 characters, the message will be split into separate 153-character messages

Hartti

hartti 2010-02-18 01:55

Re: SMS counter for N900?
 
version 0.2.0 of the SMS Counter Widget is now available in the extras-devel repository

Changes
* Added settings to change the tracking period start day
* Multi-part SMS messages are counted properly (as multiple SMS messages)
* some cosmetic changes to the UI

I am sure there are some issues which I did not find myself, so please note them here (or in the bug tracker for this project
https://garage.maemo.org/tracker/?group_id=1284

Note also that deleting messages from the device will affect the counters (as the widget is not keeping track of the messages itself, but relying on the messages currently stored in the message database)

Hartti

Soap77 2010-02-18 06:50

Re: SMS counter for N900?
 
I Installed the update, but I only got a smaller empty black box on the desktop.
Tried to remove/add widget, and also restart the device, still same thing

feLixM 2010-02-18 11:39

Re: SMS counter for N900?
 
Same problem for me as Soap77 mentioned.

peternl 2010-02-18 12:08

Re: SMS counter for N900?
 
same here...

inidrog 2010-02-18 14:39

Re: SMS counter for N900?
 
I have only installed the 0.2.0-1 from Devel and its just a black square with option to set start day of period.

No workie workie :)

hartti 2010-02-18 16:36

Re: SMS counter for N900?
 
Arrrrggggg.
Sorry guys.
Please use the version in this thread for now. I'll do some troubleshooting today.

Hartti

bncbang 2010-02-18 17:09

Re: SMS counter for N900?
 
Same problem here. I also think that the "fahrplan"-app was (somehow) deinstalled after I had installed the SMSCounter (I will try it again when you have released the fixed version).

hartti 2010-02-18 17:29

Re: SMS counter for N900?
 
Sorry for that. The problem was that somehow I had left some old code in the final build, which should not have been there.
I have submitted a new version (0.2.1) to extras-devel which will fix this. Should be available soon (as soon as it gets though the build process...)

Hartti

hartti 2010-02-18 17:42

Re: SMS counter for N900?
 
"I also think that the "fahrplan"-app was (somehow) deinstalled after I had installed the SMSCounter"

SMS counter consist only of two files. Also the installer restarts hildon-home so that the new widget becomes visible. No other applications should be affected.

Hartti


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

vBulletin® Version 3.8.8