Need Help To Interpret Google's Camcorder App-update Timer
The function below is part of the code for Google's Camera app. It is supposed to update a text view that displays dynamically the time elapsed since start of recording. But this f
Solution 1:
mHandler.sendEmptyMessageDelayed(UPDATE_RECORD_TIME, next_update_delay);
This line sends an event after next_update_delay
timespan. I suppose, there's a declaration of mHandler
somewhere and code that handles the UPDATE_RECORD_TIME
event. I'd bet it calls updateRecordingTime
, which in turn sends the message after a period of time.
This is the asynchronous version of a loop. The method does its work and then schedules itself to be executed after some time.
There must, however, be an initial call to either updateRecordingTime
or to the sendMessageDelayed
method somewhere outside updateRecordingTime
to initially start the loop.
Post a Comment for "Need Help To Interpret Google's Camcorder App-update Timer"