Archived:Alarm at specified cell id using PySymbian
This article shows how to set a notification based on the current cell id in Python on Symbian. This might be useful while travelling to be woken up on arrival.
The user of this script should know the cellid of the destination place where the user wants to set the alarm.
Just use this code, it will trigger alarm as soon as cell id of the location matches with the cell id you input,
from graphics import *
from audio import *
f = "e:\\Python\\Alarm.mp3" # Could be changed, this is what you will hear
data=appuifw.query(u"enter the cell id","number")
while abc == 0:
if(xyz == data):
abc = 1
globalui.global_note(u"Alarm Activated please wake up",'wait')
s = Sound.open(f)
s.play(KMdaRepeatForever) # Alarm will play until Network is available.
l = location.gsm_location()
globalui.global_msg_query(u""+str(l),u"your Cellid is:",7)
appuifw.app.title = u"location Mode"
appuifw.app.menu = [(u"Set Alarm",run),(u"Cellid",loc),(u"Back",quit)]
appuifw.app.exit_key_handler = quit # Press "Quit" to quit application.
app_lock = e32.Ao_lock()