The influence of DTV stream on the timer of Android in TV

Source: Internet
Author: User

In the development of TV system, the analog source (ATV/DTV) is often used. Recently found in the test, in the DTV source, a timed timer timer suddenly paused, Baidu this timer, most of the question is how to stop the timer run, and did not mention how to let him not stop, embarrassed.

After struggling for a period of time, the test found in the DTV source will appear the bug, and in other sources do not appear, inference is related to DTV source. In the digital TV is a big feature is that basically will take DTV stream time to write to the system time, to ensure that the system time and code flow time consistent. Here may be a lot of people think of, that is the timer of the characteristics of the class itself--timer timing is the absolute time, in short, is related to the system time, once the system time changes, it is likely to affect the timing of the timer- If the time in DTV stream is inconsistent with the time of the system itself, then it is conceivable that the timing of the timer will be wrong because the time of the code stream is written to the system. In the test source, the stream information is often incorrect, and the current system time (generally will be network acquisition time) certainly inconsistent, if the acquisition of this time is a day ago, one months ago or even a year ago, the timer has been the illusion of being terminated-in fact, it has been running just the timing of chaos.

The solution is very simple, use based on the relative time of the class Scheduledexecutorservice can be ~ specific usage can own Baidu, the class and system time does not hook, so you can use, It is said that in the high version of the SDK, this class has completely replaced the status of the timer, even the usage is basically consistent.

The influence of DTV stream on the timer of Android in TV

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.