Thank you very much for your replies !
But probably my request was not clear: my aim is to display informations about the patient WHILE the phone is ringing and not when the call is finished. I want to be able to see patient's information BEFORE i answer (i have many patients and often i cant remember what i sayed them during last visit).
So i think logs module is not useful for this aim.
I tryed with this code:
Code:
import appuifw
import e32
import telephone
listofnames=['Paz1', 'Paz2', 'Paz3']
database={'Paz1':['+39010555555','next app: 11/05/2008'], 'Paz2':['+390185666666','next app: 12/05/2008'],'Paz3':['+3901857777777','next app: 13/05/2008']}
def handleCall((callState, number)):
if callState == telephone.EStatusRinging:
if number <> "":
print "call from "+ number #print the number
for i in listofnames:
if(number==database[i][0]):
print database[i][1] #print next appointment
print "patient:", i #print patient name
def quit():
app_lock.signal()
appuifw.app.exit_key_handler = quit
app_lock=e32.Ao_lock()
appuifw.app.title = u"Patients PhoneBook"
telephone.call_state(handleCall)
print "waiting for a call ..."
app_lock.wait()
.. and it works !!!
but there is a problem: when the phone is ringing for an incoming call my python window disappears completely. So i can see the correct output of my script only when the call is finished.
So i ask you: is it possible to have a little window with my python output during an incomil call (i.e. when the phone is ringing) ?? I'd like to have a little window in foreground in the top of the screen.
Thank you again !!
Matteo