Hi all ,

How can I get the number of MissedCalls and Unread SMS'.

EX :Reminder: You have received 6 MissedCalls and 2 Unread SMS'.

And ofcourse I'm not talking about all calls that I didn't answer and loged in log.


How can I get the numbers and time for these MissedCalls and Unread SMS'.


How can I dismiss these MissedCalls ( So I don't get it again after alarming the user ).

Note:for sms' i can loop through inbox and get unread sms' status but I still have a problem with sms' time conversion and the right number of sender as I asked in this thread.

http://discussion.forum.nokia.com/fo...972#post743972


To be more clear :-------------------------------------------------------------------

If I searched the log it will return me the whole missed calls , And I just need the new Missed Calls , I'm making a reminder that reminder the user if he has a new missed calls.

Is there a function that return the count of new missed calls so I can loop throug the Log based on this count ??


In fact, when someone call, if we don't answer to the call, a pop-up message display "1 missed call".
Likewise, when a SMS arrive, the pop-up message says "1 new message".
When we look at the log to know who called and who sent the message, the pop-up don't appeat anymore.


Many thanks.


Many thanks in advance , And if any one can help with one question or more that would be appreciated.

Thanks for your answer , but I'm looking for a direct answer with a guide to an articel or code that solve my problems not a full site !!!

I hope you don't take me wrong. I'm willing to help, I just wanted to see some coding effort also. :)

Many thanks Beat Slayer for your efforts ,but I'm new in python world and I need a code or direct article talking about my question ( Which is how to get the number of recently missed calls ) , I'm looking all over the internet and I hope you can help me ???

Many thanks.

I'll write some hours later, a description script for your question. :)

Here it is.

I think it's pretty readable.

I know it is acting weird in the time part becuase of the timezones, but i don't have the time to look at it now. :)

I'll do it later if you can't.

import logs 
import time

call_log_in = logs.calls(mode='in')
call_log_out = logs.calls(mode='out')
call_log_fetched = logs.calls(mode='fetched')
call_log_missed = logs.calls(mode='missed')
call_log_in_alt = logs.calls(mode='in_alt')
call_log_out_alt = logs.calls(mode='out_alt')

sms_log_in = logs.sms(mode='in')
sms_log_out = logs.sms(mode='out')
sms_log_fetched = logs.sms(mode='fetched')
sms_log_missed = logs.sms(mode='missed')
sms_log_in_alt = logs.sms(mode='in_alt')
sms_log_out_alt = logs.sms(mode='out_alt')

print "Last 'in' call:"
print call_log_in[0]

print "Last 'in' sms:"
print sms_log_in[0]

last_sms = sms_log_in[0]

print 'The (phone) number associated with the log event: ',
print last_sms['number']
print 'name: ',
print last_sms['name']
print 'A description of the event: ',
print last_sms['description']
print 'The direction associated with the event (i.e. whether incoming or outgoing): ',
print last_sms['direction']
print 'Event status: ',
print last_sms['status']
print 'subject: ',
print last_sms['subject']
print "The event's id: ",
print last_sms['id']
print 'contact: ',
print last_sms['contact']
print 'duration: ',
print last_sms['duration']
print 'duration type: ',
print last_sms['duration type']
print 'flags: ',
print last_sms['flags']
print 'link: ',
print last_sms['link']
print 'The time associated with the event as a unix timestamp: ',
print last_sms['time']

sms_time = time.localtime(last_sms['time'])
utc_time = time.strftime("%Y/%m/%d-%H:%M:%S", sms_time)

print 'UTC time: ',
print utc_time

print 'data: ',
print last_sms['data']

Many thanks for your help ,

I got a lot of question but I don't know which one I should ask about this great language , I'v been working for the last couple of week on it and I really enjoy studing it.

I hope you don't mind if I ask for more information to help me.

Sure, I'm willing to help mate.

I've got around 70 programs written for symbian in python.

I just love it, because you can write debug and run them on the device, all in a snap. lol :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.