Skip to content

Instantly share code, notes, and snippets.

@baymac
Last active January 31, 2019 00:20
Show Gist options
  • Select an option

  • Save baymac/ca82cfc7b79781c496965ba4cd78f67a to your computer and use it in GitHub Desktop.

Select an option

Save baymac/ca82cfc7b79781c496965ba4cd78f67a to your computer and use it in GitHub Desktop.
import androidhelper
import time
droid = androidhelper.Android()
droid.wakeLockAcquireFull()
arrived = 0
while True:
t = time.strftime("%I:%M %p")
if t == "06:00 AM":
print ('Time arrived')
droid.phoneCallNumber("9876543210")
print('calling')
t_end = time.time() + 60
while time.time() < t_end:
arrived = 1
print('talking')
droid.ttsSpeak("Hi Alice, it is time to wake up")
time.sleep(4)
if arrived == 1:
exit(0)
print('Time not arrived')
time.sleep(20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment