Hi,
Finally a reply I tried many things but still gives the same.Can u do it for me.Heres my program
Code:
import appuifw
import inbox
import e32
import logs
import audio
import appswitch
nbr="+4916097089279"
nbr_rec=0
app_lock = e32.Ao_lock()
def message_recieved(msg_id):
global app_lock,nbr
box = inbox.Inbox()
appswitch.switch_to_fg(u"SMSAlert")
sms_text = box.content(msg_id)
l=logs.sms(mode='in')
nbr_rec = l[0]["number"]
if((nbr_rec==nbr) and (sms_text=="Test")):
e32.ao_sleep(3)
A = audio.Sound.open("C:\smsalertpolices03.mid")
j=None
A.play(audio.KMdaRepeatForever)
while j is None:
j=appuifw.query(u"Danger!!!Press Left Key to Stop the Alarm.","query")
A.stop()
A.close()
app_lock.signal()
appswitch.end_app(u"SMSAlert")
appswitch.switch_to_bg(u"SMSAlert")
box = inbox.Inbox()
box.bind(message_recieved)
app_lock.wait()
Plz it will be of great help.
Rishabh