def main(): #retrieve_contacts() #retrieve_sms() #retrieve_logs() # bind inbox to new message event box.bind(on_message) telephone.incoming_call() # bind incomming calls to on_call telephone.call_state(on_call) print 'waiting for message and calls....' # Wait for Exit app_lock.wait()
def test_incoming_call(): print "Test for incoming calls started. Validate the call state " +\ "getting printed to the actual call state the phone is in." telephone.incoming_call() telephone.answer()
elif newState == telephone.EStatusIdle: e32.ao_sleep(1,simar) def simar(): diff = (end_ringing-start_ringing) if diff<2: canvas.clear(0x000000) #black elif diff<5: elif diff<8: canvas.clear(0xffffff) #white elif diff<11: elif diff<14: elif diff<17: elif diff<20: elif diff<23: elif diff<26: elif diff<29: elif diff<32: elif diff<35: elif diff<38: elif diff<41: elif diff<44: telephone.incoming_call() telephone.call_state(newphonestate) App_lock = e32.Ao_lock() App_lock.wait()