TV development Record

Source: Internet
Author: User

first, operation and commissioning

In the mobile Android development, to run our program , you can choose to use the simulator or USB to connect the phone to run. But in the TV set (set-top box) version development, because now the TV (set-top box) General output resolution is above 720P, simulation is not very convenient, and the use of data cable connection, the same is not convenient, objectively by the length of the data line and TV (set-top box) on the interface restrictions, And this time, before our development, we found that using a data cable connection was not able to identify the device (perhaps related to the driver). In general, the methods used to develop on mobile phones do not work well on TVs (set-top boxes).

Here are a few of the ADB commands that I found very useful in the development of the TV set (set-top box):

1.adb Connect [IP]

With this command, you can connect to a device of the specified IP. With this command, the problem is solved, as long as the computer and the TV set (set-top box) connected to the same LAN, you can connect to the appropriate device, and then you can directly run or debug the program in Eclipse. Accordingly, there are

adb disconnect [IP]

Function believe that everyone knows, do not explain.

2.adb Uninstall [package]

Look at the name believe you also know that this command can be used to uninstall the app. Uninstalling the application on the TV set (set-top box) is not as convenient as we are on the phone, all using the remote control, the use of this command is much more convenient. And in this development process, due to our limited equipment, several people use a TV, often need to uninstall other people install the different signatures of the program, this command saves us a lot of time.

3.adb Shell Input Text * * * * *

The function of this command is literally believed to be able to guess, which is used to enter text. When we debug the program, in many cases to type text, which may not be a problem on the phone, on the TV, the remote control by the keyboard will really make you crash, this command is simply the Gospel

Second, UI adaptation

UI adaptation is a cumbersome and unavoidable thing to do in Android development, and is primarily adaptable to two resolutions of 1080p and 720p.

DRAWABLE-SW1080DP

Drawable-sw720dp

Correspondingly, the size of the corresponding resolution is provided:

VALUES-SW1080DP

Values-sw720dp

Extracted to: http://www.xuebuyuan.com/2127840.html

TV development Record

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.