• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

simple talking clock

Belovian

Lurker
I would like to create a simple taking clock profile to play on the hour only when my headphones are plugged in. any tips?
 
Based on what you described, very basic:

Context: headphones plugged
Context: time(24hrs): repeat every hour

Task: say %TIME

That should get you started
 
That's how I got started. but I figured it would say the time as soon as I plugged them in then every hour thereafter. for example if I plugged in at 9:26 would it then go off at 10:00 or 10:26?
 
Ok, here is what I got. got most of this from another post (thanks unclemike)

Context: headset plugged any
Context: Every hour

Variable Set %MYTIME %TIME
Variable Split %MYTIME "."
Variable Set %MYAMPM "a m"
Variable Set %MYAMPM "p m" If %MYTIME1 > 11
Variable Subtract %MYTIME1 12 If %MYTIME1 > 12
Variable Add %MYTIME1 12 If %MYTIME1 = 0
Variable Set %MYTIME1 %MYTIME1 [Do Maths] (should eliminate any leading zeros)
Variable Set %MYTIME2 %MYTIME2 [Do Maths] (should eliminate any leading zeros)
Variable Set %MYTIME2 "O Clock" If %MYTIME2 = 0
Variable Set %MYTIME2 "o %MYTIME2" If %MYTIME2 < 10
Say %MYTIME1 %MYTIME2 %MYAMPM
 
Back
Top Bottom