Is there a time listener in Android?
I have a service that implements a location Listener. When there is no GPS lock, eg in a subway, I would like to send a notification based on time.
eg. If the train arrives at station A at 12:30.
If the current clock is 12:30, I would like to send a notification to the user.
The problem is that I didn’t find anywhere a method for “onTimeChanged”. Is there any way to achieve that?
I know about the System.currentTimeMillis()) but where do I put it to check every second?
You can use TimerTask class http://developer.android.com/reference/java/util/TimerTask.html which would help you to schedule new Task after some time interval.