CN107071569A - The method and system of application are debugged on a kind of Android TV - Google Patents

The method and system of application are debugged on a kind of Android TV Download PDF

Info

Publication number
CN107071569A
CN107071569A CN201611255206.4A CN201611255206A CN107071569A CN 107071569 A CN107071569 A CN 107071569A CN 201611255206 A CN201611255206 A CN 201611255206A CN 107071569 A CN107071569 A CN 107071569A
Authority
CN
China
Prior art keywords
log information
log
application
android
debugged
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611255206.4A
Other languages
Chinese (zh)
Inventor
龚宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201611255206.4A priority Critical patent/CN107071569A/en
Publication of CN107071569A publication Critical patent/CN107071569A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging

Abstract

The invention discloses the method and system that application is debugged on a kind of Android TV, belong to software debugging technical field, wherein, method includes:Logging level is selected, the log information for being more than or equal to selected logging level is obtained in real time;The log information obtained in real time is buffered into log information set;Log information set is integrally plotted to Log Views;Log Views are shown on screen.Beneficial effect:By the way that log information set is integrally plotted into Log Views, Log Views are shown on screen again, reduce drawing number of times, improve drawing efficiency, solve the frequently performance issue and the problem of log content can not be seen clearly caused by Update log on screen, by setting different logging levels, the log information needed is shown in video screen in real time, it is easy to check daily record, convenient debugging application, by in one jiao of application interface semi-transparently show log information, not influenceing the display and interaction of application, and the development and maintenance cost applied without increase.

Description

The method and system of application are debugged on a kind of Android TV
Technical field
The present invention relates to software debugging technical field, more particularly, to debugging the method for application on a kind of Android TV and be System.
Background technology
, can be by USB data line when Android mobile phone is debugged, wireless WIFI connection mobile phones pass through ADB (Android Debug Bridge Androids debug bridge) mode debug, in checking log information on computer, be easy to exploitation and tester test Modification problem.But the typically no USB male joint of Android TV box equipment (USB data line osculum end), it is impossible to connected by USB ADB, wireless WIFI most equipments can not also connect ADB, can connect wireless AD B because television equipment and development environment (are opened Generating brain) it is not together, it has not been convenient to operate and check that daily record is debugged.
What is be currently known is achieved in that by the way that log information is saved in into the USB flash disk inserted on TV, is inserted in out by USB flash disk Check that daily record is debugged on generating brain.This mode is cumbersome, it is necessary to preserve and check back and forth, it has not been convenient to debug.
The content of the invention
It is an object of the invention to overcome above-mentioned technical deficiency, propose to debug the method for application on a kind of Android TV and be System, solves the inconvenient technical problem of debugging application on Android TV in the prior art.
To reach above-mentioned technical purpose, technical scheme provides a kind of method that application is debugged on Android TV, Wherein, including:
S1, selection logging level, obtain the log information for being more than or equal to selected logging level in real time;
S2, the log information obtained in real time buffered into log information set;
S3, the log information set is integrally plotted to Log Views;
S4, the Log Views are shown on screen.
The present invention also provides the system that application is debugged on a kind of Android TV, wherein, including:
Obtain log information module:For selecting logging level, the institute for being more than or equal to selected logging level is obtained in real time State log information;
Log information set cache module:For the log information obtained in real time to be buffered into the log information collection Close;
Draw Log Views module:For the log information set to be integrally plotted into Log Views;
Display module:For the Log Views to be shown into screen.
Compared with prior art, beneficial effects of the present invention include:By the way that the log information obtained in real time is buffered into day Will information aggregate, Log Views are integrally plotted to by log information set, then Log Views are shown on screen, are reduced and are painted Figure number of times, improves drawing efficiency, and solve frequently performance issue and can not see daily record clearly on screen caused by Update log The problem of content, by setting different logging levels, the log information needed is shown in video screen in real time, is easy to check day Will, convenient debugging application, by one jiao of application interface semi-transparently show log information, not influenceing the display and friendship of application Mutually, and without the development and maintenance cost of increase application.
Brief description of the drawings
Fig. 1 is the method flow diagram that application is debugged on a kind of Android TV that the present invention is provided;
Fig. 2 is the system architecture diagram that application is debugged on a kind of Android TV that the present invention is provided.
In accompanying drawing:1st, the system that application is debugged on Android TV, 11, obtain log information module, 12, log information set Cache module, 13, draw Log Views module, 14, display module.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The invention provides a kind of method that application is debugged on Android TV, wherein, including:
S1, selection logging level, obtain the log information for being more than or equal to selected logging level in real time;
S2, the log information obtained in real time buffered into log information set;
S3, log information set is integrally plotted to Log Views;
S4, Log Views are shown on screen.
In the method that application is debugged on Android TV of the present invention, step S1:
Exploitation version debugging entrance is provided in Android TV applications, sets interface to increase debugging switch and logging level choosing Select, when debugging switch is opened, selection logging level can show corresponding log information on screen, when debugging switch is closed When, any log information is not shown;
VERBOSE (more detailed logging, output is more than or equal to the other information of VERBOSE journal stages) may be selected in logging level, (notice daily record, output is more than or waited by DEBUG (debugging log, output is more than or equal to the other information of DEBUG journal stages), INFO In the other information of INFO journal stages), (warning daily record, output is more than or equal to the other information of WARN journal stages to WARN, and ERROR is (wrong Daily record by mistake, only exports the other information of ERROR journal stages), daily record rank is from high to low ERROR, WARN, INFO, DEBUG, VERBOSE;
Log acquisition order is generated according to the logging level of selection, it is variable cmd_logcat to define log acquisition order, It is logcat* to select order cmd_logcat during VERBOSE ranks:V, order cmd_logcat is during selection DEBUG ranks logcat*:D, order cmd_logcat is logcat* during selection INFO ranks:I, cmd_ is ordered during selection WARN ranks Logcat is logcat*:W, order cmd_logcat is logcat* during selection ERROR ranks:E;
Calling system method Runtime.getRuntime () .exec (cmd_logcat) performs cmd_logcat orders, This method returns to the data flow InputStream obtained after the order is performed, calls InputStream.readLine () to this Data line (i.e. a line log information) is read in data flow circulation, and log information is obtained in real time.
In the method that application is debugged on Android TV of the present invention, step S2:
InputStream.readLine () in S1 is read into a line log information to data flow InputStream circulations to protect A storage unit is stored to, optionally, storage unit is variable line_logcat;
Optionally, Log Views use TextView (a kind of text view), and Log Views TextView is highly set to Screen height, the displayable line number line_count of Log Views for Log Views height divided by a line daily record height, i.e., Line_count=getHeight ()/line_logcat.getHeight (), optionally, log information set uses queue Gather variable, state a collection of queues variable line_list, the size for setting set is line_count, line_count For the displayable line number of Log Views, line_count log information is stored up in line_list;
InputStream.readLine () circulations are read a line log information in real time and cached by variable line_logcat Enter log information set line_list, carry out before caching, first judge whether line_list has been filled with, if line_ List.getSize () is equal to line_count, then using line_list.remove (0) by first in line_list Daily record is deleted, and recycles line_list.add (line_logcat) to add a newest log information in line_logcat It is added in line_list;If line_list.getSize () is less than line_count, line_list.add is utilized (line_logcat) directly a newest log information in line_logcat is added in line_list.
In the method that application is debugged on Android TV of the present invention, step S3:
Using TextView.setText (line_list) by the daily record whole installation cached in line_list to daily record In view TextView.
In the method that application is debugged on Android TV of the present invention, step S4:
Using WindowManager.addView (TextView, the position LayoutParams of display) by Log Views TextView is shown on screen by Android system WindowManager (view window management), wherein the position shown LayoutParams can be arranged as required to different positions, such as the screen left side, the right etc., set WindowManager.LayoutParams.width is the width that getWidth ()/3, getWidth () obtains screen, this day / 3rd of a width of screen of will view, set WindowManager.LayoutParams.gravity be Gravity.RIGHT, i.e. Log Views are shown in the right side of screen, in addition, not shadow while in order to show log information The display of back view is rung, Log Views TextView background is set to translucent, translucent white is such as set to TextView.setBackgroundColor (#a9ffffff), wherein #a9ffffff are 16 system generations of translucent white color Code;
The method that Log Views are directly displayed onto interface is compared by WindowManger and shown in relatively application at present The method of general view, it is to need to be added in the layout of Activity (display interface in Android) that general view, which is shown, often Individual application has many Activity, and this is accomplished by adding Log Views in each Activity layout, it is clear that so meeting Cause Log Views and application to bind together, increase development and maintenance cost, each Activity there are Log Views.Pass through WindowManger does not change the method that Log Views are directly displayed onto interface the layout using existing Activity, The function of application is not influenceed, the window of application is added to, does not increase the development and maintenance cost of application.
The present invention also provides the system 1 that application is debugged on a kind of Android TV, wherein, including:
Obtain log information module 11:For selecting logging level, obtain be more than or equal to selected logging level in real time Log information;
Log information set cache module 12:For the log information obtained in real time to be buffered into log information set;
Draw Log Views module 13:For log information set to be integrally plotted into Log Views;
Display module 14:For Log Views to be shown into screen.
The system 1 of application is debugged on Android TV of the present invention, is obtained in log information module 11:
When debugging switch is opened, selection logging level can show corresponding log information on screen, when debugging is opened When closing, any log information is not shown.
Debugged on Android TV of the present invention in the system 1 of application, log information set cache module 12:
The log information obtained in real time is saved in a storage unit, storage unit in real time delays the log information of acquisition It is stored in log information set.
Debugged on Android TV of the present invention in the system 1 of application, log information set cache module 12:
Log information set can buffer some amount log information, when daily record information aggregate cache log information quantity The upper limit is reached, a wherein oldest log information, and one newest log information of acquisition from storage unit is automatically deleted Cached, when the log information quantity that daily record information aggregate is cached is not reaching to the upper limit, one is directly obtained from storage unit The newest log information of bar is cached.
Debugged on Android TV of the present invention in the system 1 of application, display module 14:Log Views are shown in screen On length and width, color, position can adjust.
The method and system for debugging application on a kind of Android TV that the present invention is provided in use, select day first Will grade, obtains the log information for being more than or equal to selected logging level in real time;Then the log information obtained in real time is cached Enter log information set;Log information set is integrally plotted to Log Views;Finally Log Views are shown on screen.
Compared with prior art, beneficial effects of the present invention include:By the way that the log information obtained in real time is buffered into day Will information aggregate, Log Views are integrally plotted to by log information set, then Log Views are shown on screen, are reduced and are painted Figure number of times, improves drawing efficiency, and solve frequently performance issue and can not see daily record clearly on screen caused by Update log The problem of content, by setting different logging levels, the log information needed is shown in video screen in real time, is easy to check day Will, convenient debugging application, by one jiao of application interface semi-transparently show log information, not influenceing the display and friendship of application Mutually, and without the development and maintenance cost of increase application.
The embodiment of present invention described above, is not intended to limit the scope of the present invention..Any basis Various other corresponding changes and deformation that the technical concept of the present invention is made, should be included in the guarantor of the claims in the present invention In the range of shield.

Claims (10)

1. the method for application is debugged on a kind of Android TV, it is characterised in that including:
S1, selection logging level, obtain the log information for being more than or equal to selected logging level in real time;
S2, the log information obtained in real time buffered into log information set;
S3, the log information set is integrally plotted to Log Views;
S4, the Log Views are shown on screen.
2. the method for application is debugged on Android TV as claimed in claim 1, it is characterised in that in step S1:
When debugging switch is opened, selection logging level can show the corresponding log information on screen, when debugging is opened When closing, any log information is not shown.
3. the method for application is debugged on Android TV as claimed in claim 1, it is characterised in that in step S2:
The log information obtained in real time is saved in a storage unit, the storage unit is in real time by the day of acquisition Will information cache enters the log information set.
4. the method for application is debugged on Android TV as claimed in claim 3, it is characterised in that in step S2:
The log information set can buffer some amount the log information, when the log information set caching described in Log information quantity reaches the upper limit, is automatically deleted a wherein oldest log information, and obtained from the storage unit A newest log information is taken to be cached, when the log information quantity that the log information set is cached is not reaching to The upper limit, one newest log information of acquisition is cached directly from the storage unit.
5. the method for application is debugged on Android TV as claimed in claim 1, it is characterised in that in step S4:
Length and width that the Log Views are shown on screen, color, position can be adjusted.
6. the system of application is debugged on a kind of Android TV, it is characterised in that including:
Obtain log information module:For selecting logging level, the day for being more than or equal to selected logging level is obtained in real time Will information;
Log information set cache module:For the log information obtained in real time to be buffered into the log information set;
Draw Log Views module:For the log information set to be integrally plotted into Log Views;
Display module:For the Log Views to be shown into screen.
7. the system of application is debugged on Android TV as claimed in claim 6, it is characterised in that obtain log information module In:
When debugging switch is opened, selection logging level can show the corresponding log information on screen, when debugging is opened When closing, any log information is not shown.
8. the system of application is debugged on Android TV as claimed in claim 6, it is characterised in that log information set caches mould In block:
The log information obtained in real time is saved in a storage unit, the storage unit in real time believes the daily record of acquisition Breath buffers into log information set.
9. the system of application is debugged on Android TV as claimed in claim 8, it is characterised in that log information set caches mould In block:
The log information set can buffer some amount the log information, when daily record information aggregate cache log information Quantity reaches the upper limit, is automatically deleted a wherein oldest log information, and obtains one most from the storage unit New log information is cached, when the log information quantity that daily record information aggregate is cached is not reaching to the upper limit, directly from described A newest log information is obtained in storage unit to be cached.
10. the system of application is debugged on Android TV as claimed in claim 6, it is characterised in that in display module:
Length and width that the Log Views are shown on screen, color, position can be adjusted.
CN201611255206.4A 2016-12-30 2016-12-30 The method and system of application are debugged on a kind of Android TV Pending CN107071569A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611255206.4A CN107071569A (en) 2016-12-30 2016-12-30 The method and system of application are debugged on a kind of Android TV

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611255206.4A CN107071569A (en) 2016-12-30 2016-12-30 The method and system of application are debugged on a kind of Android TV

Publications (1)

Publication Number Publication Date
CN107071569A true CN107071569A (en) 2017-08-18

Family

ID=59624101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611255206.4A Pending CN107071569A (en) 2016-12-30 2016-12-30 The method and system of application are debugged on a kind of Android TV

Country Status (1)

Country Link
CN (1) CN107071569A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885483A (en) * 2019-01-17 2019-06-14 珠海金山网络游戏科技有限公司 Log method for visualizing and system for operating status in Real-time Feedback game
CN110286940A (en) * 2019-06-26 2019-09-27 四川长虹电器股份有限公司 Smart television log generation method
CN112000405A (en) * 2020-07-29 2020-11-27 深圳市智微智能软件开发有限公司 Method, equipment and storage medium for conveniently acquiring system logs
CN112783724A (en) * 2021-01-26 2021-05-11 上海商米科技集团股份有限公司 Log capture debugging method and system, intelligent device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224443A (en) * 2015-10-09 2016-01-06 广州视睿电子科技有限公司 A kind of method and apparatus of Android terminal show log information

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224443A (en) * 2015-10-09 2016-01-06 广州视睿电子科技有限公司 A kind of method and apparatus of Android terminal show log information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANDTEAMROID: "在textview中显示logcat日志", 《BLOGJAVA》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885483A (en) * 2019-01-17 2019-06-14 珠海金山网络游戏科技有限公司 Log method for visualizing and system for operating status in Real-time Feedback game
CN110286940A (en) * 2019-06-26 2019-09-27 四川长虹电器股份有限公司 Smart television log generation method
CN110286940B (en) * 2019-06-26 2022-03-25 四川长虹电器股份有限公司 Smart television log generation method
CN112000405A (en) * 2020-07-29 2020-11-27 深圳市智微智能软件开发有限公司 Method, equipment and storage medium for conveniently acquiring system logs
CN112783724A (en) * 2021-01-26 2021-05-11 上海商米科技集团股份有限公司 Log capture debugging method and system, intelligent device and storage medium

Similar Documents

Publication Publication Date Title
CN107071569A (en) The method and system of application are debugged on a kind of Android TV
CN111159600B (en) Information reporting method and device for elements on page, electronic equipment and storage medium
US9571999B2 (en) Conditional interaction control for a virtual object
CN105100215A (en) Data transmission method, device and system based on automobile data recorders
US20150046516A1 (en) Computer system, data output method, and computer program
CN103631703A (en) Software performance testing method and device in Android device
CN109739770A (en) The adjustment method and device of small routine
CN103473069B (en) The method utilizing the access price model optimization mobile applications of android system API
CN111680008B (en) Log processing method and system, readable storage medium and intelligent device
CN104216826A (en) Test method and device
CN110245559A (en) Real-time object identification method, device and computer equipment
CN108322359A (en) A kind of acquisition methods and device of page initial screen time
US10271044B2 (en) Method and system for checking video call quality of mobile terminal
CN102375103B (en) Electronic product test device and method
CN105204832A (en) System and method for achieving script engine
CN109739704A (en) A kind of interface test method, server-side and computer readable storage medium
CN109246467A (en) Label is to the method, apparatus of sharing video frequency, video camera and smart phone
US20190297473A1 (en) Data usage recommendation generator
CN105138399A (en) Cross-platform mobile Web application runtime engine
CN110198427A (en) Video call method and device
CN108182149A (en) Built-in browser adjustment method, debugging terminal and computer readable storage medium
CN106550250A (en) Barrage exchange method, device and electronic equipment
CN103106140A (en) Intelligent display device testing information display method
CN109992614B (en) Data acquisition method, device and server
CN109740076A (en) Webpage display process and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170818