how to get current hours?

5 views
Skip to first unread message

extre frank

unread,
Aug 14, 2015, 8:46:03 PM8/14/15
to App Reactor for Android
I want to make a function called ABC() that runs between 8:00-18:00,and 23:00-6:00
but:
when screen is on, delay ABC(), 
when screen is off, wait 30min and check screen, if screen is off then run ABC(). 

I wonder is there a api can get current hours?
 i found cron, but if there is a api can get hours is much better.

thanks for this great great app
newbie ueser

joel leaman

unread,
Oct 29, 2015, 4:29:24 AM10/29/15
to App Reactor for Android
To get the current time, use the time() function. Look at some of the time related questions here to get an idea of how to use it.

joel leaman

unread,
Oct 29, 2015, 4:30:54 AM10/29/15
to App Reactor for Android
As for the screen, as far as I know there's no function in Reactor to check the current status of the screen.
Reply all
Reply to author
Forward
0 new messages