Multi-Android Device Parallel Detection Method and Device Based on WPF

Through the WPF framework, the parallel detection of multiple Android devices is realized, and the device information is automatically obtained and parallel processing is solved, which solves the problem of low detection efficiency of a single device and realizes efficient automation of simultaneous detection of multiple devices.

CN114490204BActive Publication Date: 2025-07-04XCMG HANYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111596780.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-07-04
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

The existing Android device detection application can only be detected by a single device, but cannot meet the simultaneous detection of multiple devices, resulting in low utilization of manpower and computers and serious waste of resources.

Method used

The WPF framework-based multi-Android device parallel detection method is adopted. By automatically obtaining the serial port number, ID and SN accessed by the device, creating a parallel thread to obtain detailed information, and displaying it in a sub-window, supporting multi-device parallel detection.

Benefits of technology

It has realized the automation and parallel detection of multiple Android devices, saving manpower and material resources, improving resource utilization, and supporting simultaneous detection of 12 devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114490204B_ABST
    Figure CN114490204B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for parallel detection of multiple Android devices based on WPF. A desktop application for Android device detection is designed based on the WPF framework. When an Android device is connected, a thread is automatically triggered to obtain the computer serial port number, the Android device ID, and the SN, and then detailed information of the Android device is obtained. Since it is designed based on the WPF framework, all connected Android devices can be detected in parallel. The present invention also divides the user interface into vector graphics of sub-windows with the same number as the computer serial port numbers through the UI framework in WPF. Each sub-window is bound to a computer serial port number to display the detection information of the corresponding Android device. The present invention realizes the automatic detection of Android devices and saves the detection time at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for parallel detection of multiple Android devices based on WPF, belonging to the technical field of data detection. Background Art

[0002] Currently, there are many desktop applications for detecting Android devices. The main function is that when the corresponding desktop application for detection is running, after the Android device is connected to the computer, clicking the start detection button, the software starts to detect, and after the test is completed, the detection results are generated and displayed to the user. For traditional desktop applications for detecting Android devices, the start detection button needs to be triggered manually, and only the detection of one Android device is supported each time. It cannot meet the requirement of detecting multiple Android devices simultaneously. Since the single detection time of a single Android device is long, both the manpower and computer utilization rate are very low, resulting in serious resource waste. Summary of the Invention

[0003] The purpose of the present invention is to provide a method and device for parallel detection of multiple Android devices based on WPF, which can detect multiple Android devices simultaneously.

[0004] To achieve the above purpose, the technical solution adopted by the present invention is as follows:

[0005] The present invention provides a method for parallel detection of multiple Android devices based on WPF, including:

[0006] Automatically trigger the device access interface of the desktop application deployed in the computer based on the accessed Android device, and automatically obtain the serial port number, Android device ID, and SN of the accessed Android device; the desktop application is designed based on the WPF framework and is in an open state;

[0007] Call the create thread interface in the WPF framework based on the serial port number accessed by the Android device to start a thread bound to the serial port number, and obtain the detailed information of the Android device through this thread;

[0008] Display the Android device ID, SN, and detailed information of the Android device associated with the serial port number in the corresponding sub-window.

[0009] Further, it further includes,

[0010] Connect the Android device to the serial port of the computer through a data cable, and trigger the device access detection interface in the WPF framework.

[0011] Further, the automatic acquisition of the serial port number, Android device ID, and SN accessed by the Android device includes:

[0012] The device access detection interface within the WPF framework is triggered to cause the desktop application to automatically create a thread for querying the serial bus data of the computer, find the serial port number connected to the computer, and obtain the ID and SN data of the corresponding Android device through the serial port number.

[0013] Further, it also includes extracting the field used to uniquely identify the serial port from the obtained computer serial port number.

[0014] Further,

[0015] Each time an Android device is accessed, the device access detection interface within the WPF framework is triggered once, and at the same time, a thread is automatically created and associated with the accessed computer serial port number. The access of multiple Android devices proceeds in parallel.

[0016] Further,

[0017] According to the obtained serial port number, call the thread creation interface within the WPF framework to start a thread and generate a thread number.

[0018] Use the started thread to execute ADB commands, and according to the configuration file of the detailed information items of the Android device to be obtained, execute the corresponding ADB commands one by one to obtain the detailed information of the Android device.

[0019] The detailed information of the Android device includes at least one of the following: the model of the Android device, the international mobile equipment identity of the Android device, the running memory of the Android device, and the body storage of the Android device.

[0020] Further, it also includes:

[0021] Through the UI framework in WPF, divide the user interface into vector graphics of sub-windows with the same number as the computer serial port quantity, and each sub-window is bound to a computer serial port number.

[0022] The present invention also provides a multi-Android device parallel detection device based on WPF, including:

[0023] The device connection information acquisition module is used to acquire the serial port number, Android device ID, and SN accessed by the Android device;

[0024] The device detailed information acquisition module is used to acquire the detailed information of the Android device;

[0025] and

[0026] The device information display module is used to display the Android device ID, SN, and detailed information of the Android device associated with the serial port number in the corresponding sub-window.

[0027] Furthermore, the device connection information acquisition module is specifically used for,

[0028] After the Android device is connected, automatically create a thread to query the serial bus data of the computer, find the serial port number of the serial port connected to the computer, and obtain the ID and SN data of the corresponding Android device through the serial port number;

[0029] And extract the field used to uniquely identify the serial port from the obtained computer serial port number, and send it together with the ID and SN data of the Android device to the device detailed information acquisition module;

[0030] The device connection information acquisition module supports creating multiple threads simultaneously to perform parallel detection on multiple connected Android devices.

[0031] Furthermore, the device detailed information acquisition module is specifically used for,

[0032] Call the thread creation interface in the WPF framework according to the obtained serial port number to start a thread and generate a thread number,

[0033] Execute the ADB command using the started thread, and execute the corresponding ADB command one by one according to the configuration file of the Android device detailed information item to be obtained to obtain the detailed information of the Android device;

[0034] And send the obtained detailed information of the Android device together with the serial port number, ID, and SN data of the Android device to the device information display module;

[0035] The detailed information of the Android device includes at least one of the following: the model of the Android device, the international mobile equipment identification code of the Android device, the operating memory of the Android device, and the body storage of the Android device;

[0036] The device detailed information acquisition module supports starting multiple threads simultaneously to perform parallel detection on multiple connected Android devices.

[0037] Furthermore, the device information display module is specifically used for,

[0038] Through the UI framework in WPF, a vector diagram of the user interface is divided into sub-windows with the same number as the computer's serial port numbers, and each sub-window is bound to a computer serial port number;

[0039] The Android device ID, SN, and detailed information of the Android device associated with the serial port number are displayed in the corresponding sub-window;

[0040] In addition, the detection status of the Android device is displayed; the detection status of the Android device includes: the Android device is not connected, the Android device detection is completed, and the Android device detection is not completed.

[0041] Furthermore, it also includes,

[0042] The device information printing module is used to output all the information of the Android device displayed in the corresponding sub-window to the printing device.

[0043] The beneficial effects of the present invention are:

[0044] The present invention provides a method for parallel detection of multiple Android devices based on WPF. When the user connects an Android device to the computer, the application automatically detects the connection information, obtains the device information, and displays it in the corresponding sub-window. All these operations are automatic and do not require manual operation.

[0045] One computer can connect multiple Android devices simultaneously. Each time an Android device is connected, a thread is started to detect and display the Android device. These threads can operate concurrently, saving a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a flowchart for obtaining and displaying the information of an Android device in an embodiment of the present invention;

[0047] Figure 2 is a schematic structural diagram for detecting an Android device in an embodiment of the present invention;

[0048] Figure 3 is a schematic diagram of the arrangement of sub-windows of the desktop application in an embodiment of the present invention;

[0049] Figure 4 is a rendering of the detected Android device displayed in a sub-window in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0050] The present invention will be further described below. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.

[0051] WPF: (Windows Presentation Foundation), a user interface framework based on Windows launched by Microsoft, is part of.NET Framework 3.0 (an integrated environment for Windows systems). It provides a unified programming model, language, and framework, truly separating the work of interface designers and developers; at the same time, it provides a brand-new multimedia interactive user graphical interface. Compared with the development of Windows clients, WPF has taken a huge step forward. It provides an extremely rich.NET UI framework (.net is a free and open-source development platform for building various applications; UI stands for User Interface, that is, the user interface), integrating vector graphics.

[0052] Serial port: The serial interface is abbreviated as the serial port, also known as the serial communication interface or serial communication interface (usually refers to the COM interface, that is, the serial communication port), which is an extended interface using serial communication mode. The serial interface (Serial Interface) means that data is transmitted sequentially bit by bit. Its characteristic is that the communication line is simple, and only a pair of transmission lines can achieve two-way communication.

[0053] The present invention provides a method for parallel detection of multiple Android devices based on WPF. The number of Android devices that can be connected simultaneously is 12. The content to be detected is determined according to the provided configuration document. The detection results will be displayed in the corresponding desktop application window. The window of the application is divided into 12 sub-windows (displayed as a 4×3 matrix), corresponding to 12 serial port numbers of the computer respectively; and it supports printing the information of the corresponding Android devices.

[0054] A method for parallel detection of multiple Android devices based on WPF provided by a specific embodiment of the present invention, taking the detection of one Android device as an example, see Figure 1 , the specific implementation process is as follows (this process is under the premise that the application for detection is running):

[0055] S10: Obtain the access information of the Android device.

[0056] The access information of the Android device includes the serial port number of the computer to which the Android device is connected, the ID information stored in the memory of the Android device (Identity document, i.e., the identity identification number of the Android device), the SN (Serial Number, i.e., the product serial number of the Android device) stored in the Android device system, and so on.

[0057] The specific process is as follows:

[0058] S10-1: The user connects the Android device to the serial port of the computer through a data cable. At this time, the device access interface of the desktop application deployed on the computer for Android device detection will be triggered. In this embodiment, the device access interface of the desktop application refers to the device access detection interface within the WPF framework.

[0059] Every time the user connects an Android device, the device access detection interface within the WPF framework corresponding to the desktop application is triggered. This interface will detect that a device has been connected and simultaneously obtain the type of the connected device (Android device), the port number of the computer port to which it is connected, the SN and ID of the connected Android device. This port number is a string of characters recognizable by the computer. After obtaining this port number, first extract some fields of the detected port number and record it as the port number port_1 to be used next (the port number recognized by the computer is not very readable and the string is too long, and finally it is a number from 1 to 12, with the number corresponding to the port number one by one); then form parameters by calling a certain method with the obtained port number and device information and pass them to S20. A method is a way and means to achieve a certain goal. A way is the selected path, and a means is the measure taken. Here, it means that a method is a code block to be executed. The method name (parameters) represents the method header, and the main statements of the method must be placed in curly braces (i.e., {}).

[0060] For example, the data form is (port, ID, SN), where port is the serial port number of the Android device connected to the computer obtained by the desktop application. For example, (port_1, ID_1, SN_1) means that the Android device with ID ID_1 and SN SN_1 is connected to the serial port of the computer with port number port_1.

[0061] Trigger the access event through the serial port to return the main parameters of the connected Android device, so as to obtain the ID and SN of the corresponding Android device, and at the same time record the corresponding serial port number.

[0062] It should be noted that in this embodiment, the maximum number of Android devices that can be supported for simultaneous connection is 12. If you want to reach the maximum number of connected Android devices, the computer must have at least 12 serial ports. In actual operation, the number of Android devices that can be connected is equal to the number of available serial ports. Similarly, the number of Android devices that can be detected simultaneously is equal to the number of connected Android devices. There is no absolute requirement for the number of serial ports and the number of Android devices.

[0063] S20: Obtain the detailed information of the corresponding Android device according to the Android device data transmitted in S10 in this embodiment.

[0064] The detailed information of the Android device includes: the model of the Android device, the IMEI (International Mobile Equipment Identity) of the Android device, the RAM (i.e., the running memory) of the Android device, the ROM of the Android device (i.e., the body storage, which is the capacity for storing data), etc., and is specifically determined according to the requirements in the loaded configuration document.

[0065] Execute ADB (Android Debug Bridge, which acts as a debug bridge. Adb is a tool in the Android SDK) commands to obtain the detailed information of the corresponding Android device. Extract the required part of the data from these Android device detailed information and transmit it together with the Android device data transmitted in S10 in this embodiment to S30 in this embodiment. The specific implementation steps are as follows:

[0066] S20-1: After receiving the Android device data transmitted in S10 in this embodiment, the desktop application will call the interface for creating a thread within the WPF framework to start a thread and generate a thread ID. All subsequent operations on this Android device will be completed by this thread. During this process, the ThreadId is used to record the thread ID until this thread is closed.

[0067] The newly started thread executes ADB commands and executes the corresponding ADB commands one by one according to the detailed information items of the Android device to be obtained.

[0068] For example, to obtain the model of an Android device, the command "adb -s SN_1 shell getprop ro.product.model" needs to be executed. Here, "adb shell getprop ro.product.model" is the command to obtain the model of an Android device, but this situation only applies to connecting a single Android device; adding "-s SN_1" means that this command is executed for the device with the SN of SN_1. SN_1 is the SN of the corresponding Android device passed by S10 in this embodiment.

[0069] S20-2: After the command in S20-1 is executed, collect the returned data and extract the required part. After all commands are executed, all the extracted data, together with the Android device data passed by S10 in this embodiment, is passed to S30 in this embodiment.

[0070] For example, execute the command "Adb -s SN_1 shell getprop ro.product.model" (where SN_1 is the SN of the corresponding Android device passed by S10 in this embodiment), and the returned data is "model_1\r\n". Extract the data "model_1" as the model of the Android device to be detected in this embodiment. Obtain other data information of the Android device to be detected in this embodiment in this way. After obtaining the last data, pass the data to S30 in this embodiment.

[0071] For example, the extracted data is in the form of (port_1, SN_1, model_1, IMEI_1,...). port_1 represents the serial port number of the Android device to be detected in this embodiment, which is passed by S10 in this embodiment; SN_1 represents the SN of the Android device to be detected in this embodiment, which is passed by S10 in this embodiment; model_1 represents the model of the Android device to be detected in the embodiment; IMEI_1 represents the IMEI of the Android device to be detected in the embodiment;... represents other data information of the Android device to be detected in the embodiment.

[0072] S30: According to the data passed by S20 in this embodiment, display the detection result of the Android device in the window of the desktop application.

[0073] In this embodiment, first, through the UI framework in WPF, the user interface is divided into a vector diagram of 4×3, a total of 12 sub-windows (sub-window numbers are 1 to 12). Each sub-window serves as a display area and can display the information of one Android device, such as Figure 3, after the thread of S20 is started in this embodiment, according to the serial port number of the corresponding Android device, the detection status and test result data of the Android device are displayed in a sub-window. The specific steps are as follows:

[0074] S30-1: In this embodiment, S30 and S20 are in the same thread. After the S20 thread is started, the serial port number of the Android device in this embodiment is obtained as the sub-window number displayed in the desktop application (see Figure 3 , the sub-window numbers are: the window numbers in the first row are 1, 2, 3, 4 respectively; the window numbers in the second row are 5, 6, 7, 8 respectively; the window numbers in the third row are: 9, 10, 11, 12), and the information of this Android device is displayed in the corresponding sub-window area.

[0075] For example, if the serial port number of the Android device connected to the computer in this embodiment is port_1, the relevant information and data of this Android device are displayed in the sub-window with the sub-window number 1 in the first row and the first column.

[0076] S30-2: In the corresponding sub-window, not only the test result data of the Android device detection in this instance is displayed, but also the detection status of this Android device is displayed. When the serial port corresponding to the sub-window is not connected to the Android device, it is displayed as empty, and the background color of the sub-window is white; when the serial port corresponding to the sub-window is connected to the Android device but the detection is not completed, the background color of the sub-window is yellow; when the serial port corresponding to the sub-window is connected to the Android device and the detection is completed, the background color of the sub-window is green, and the test result data of the Android device is displayed, with one attribute displayed in one row, and a print icon is displayed.

[0077] For example, after the Android device detection is completed in this embodiment, the background color of the window in the first row and the first column is green, and the displayed information is:

[0078] SN: SN_1

[0079] Model: model_1

[0080] IMEI: IMEI_1

[0081] ……

[0082] A print icon is displayed in the lower right corner.

[0083] Figure 3 It is a schematic diagram of the sub-window arrangement of the desktop application in this embodiment. The sub-window numbers are: the window numbers in the first row are 1, 2, 3, 4 respectively; the window numbers in the second row are 5, 6, 7, 8 respectively; the window numbers in the third row are 9, 10, 11, 12 respectively.

[0084] Figure 4 It is the display effect diagram of the Android device detected in this embodiment in the sub-window.

[0085] S30-3: When the computer is disconnected from the Android device, clear the information in the corresponding sub-window and close the thread. This thread is the thread started in S20-1 of this embodiment.

[0086] S40: Print the data of the Android device detected in this embodiment.

[0087] Click the print icon of the corresponding sub-window in this embodiment, and output the SN, IMEI, RAM, and ROM information of the Android device detected in this embodiment to the selected printing device, usually on a label paper.

[0088] It should be noted that the desktop application of the present invention can achieve parallel detection and display of 12 sub-windows. That is, in step S10-1, when connecting any number of Android devices not greater than 12, steps S10 - S40 can be executed simultaneously, and the sub-window threads do not affect each other and proceed simultaneously.

[0089] Figure 2 It is a schematic structural diagram of a multi-Android device detection device provided by another embodiment of the present invention. The device includes a device connection information acquisition module 100, a device detailed information acquisition module 200, a device information display module 300, and a device information printing module 400.

[0090] The device connection information acquisition module 100 is used to acquire the access information of the android device.

[0091] The access information of the Android device includes the computer serial port number to which the Android device is connected, the ID information stored in the Android device memory, the SN stored in the Android device system, etc. In this embodiment, acquiring the access information of the Android device is to acquire the computer serial port number to which the Android device is connected and the SN of the connected Android device. The user connects the Android device and the computer through a data cable, and the device access detection interface in the WPF framework is triggered. Every time the user connects an Android device, the device connection information acquisition module 100 will start a thread to query the serial bus data of the computer, find the serial port number connected to the computer, and obtain the ID and SN data of the corresponding Android device through the serial port number. For example, (port_1, ID_1, SN_1) indicates that the Android device with ID ID_1 and SN SN_1 is connected to the computer's serial port number port_1.

[0092] It should be noted that 12 Android devices can be detected in parallel in this embodiment. When an Android device is connected to the computer, the COM port device access interface of the WPF framework basic application interface will be triggered. Therefore, the device connection information acquisition module 100 will create a thread, and this thread is associated with the currently inserted Android device. After the Android device is accessed, the associated thread automatically starts to query the serial port number connected to the computer, and obtains the ID and SN data of the corresponding Android device and sends them to the device detailed information acquisition module 200; this operation is repeated for each connected Android device, and the upper limit of the connection is 12 Android devices. If more than 12 Android devices are connected, no new threads will be created; if a certain Android device is disconnected from the computer, the total number of currently connected Android devices will be reduced by 1 accordingly.

[0093] The device detailed information acquisition module 200 obtains the detailed information of the corresponding Android device through the SN of the Android device.

[0094] The detailed information of the Android device includes: the model of the Android device, the IMEI (International Mobile Equipment Identity) of the Android device, the RAM (i.e., the running memory) of the Android device, the ROM (i.e., the body storage, which is the capacity for storing data) of the Android device, etc., and is specifically determined according to the requirements in the loaded configuration document.

[0095] After receiving the SN of the Android device sent by the device connection information acquisition module 100 in this embodiment, the device detailed information acquisition module 200 calls the interface for creating a thread in the WPF framework to start a thread to execute the ADB command, and executes the corresponding ADB command one by one according to the detailed information items of the Android device to be obtained. After the command execution is completed, the returned data is collected, the required part is extracted, and is sent to the device information display module 300 together with the data sent by the device connection information acquisition module 100.

[0096] For example, to obtain the model of an Android device, the command "adb -s SN_1 shell getpropro.product.model" needs to be executed. Here, "adb shell getprop ro.product.model" is the command to obtain the model of an Android device, but this situation only applies to connecting a single Android device; adding "-s SN_1" indicates that this command is executed for the device with the SN of SN_1. SN_1 is the SN of the Android device in this embodiment. The returned data is "model_1\r\n", and the data "model_1" is extracted as the model of the detected Android device in this embodiment. The Android device data acquisition module 200 obtains other data information of the detected Android device in this embodiment in this way.

[0097] The device information display module 300 is used to display the detection results and detection status of the Android device in the corresponding sub-windows. The device information display module 300 divides the user interface into a vector graph of 4×3, a total of 12 sub-windows, through the UI framework in WPF. Each sub-window serves as a display area and can display the information of one Android device.

[0098] The device information display module 300 displays the Android device detection status and test result data in the corresponding window in the 4×3 sub-windows of the desktop application according to the serial port number accessed by the Android device. In the corresponding sub-window, not only the result data of the Android device detection in this instance is displayed, but also the status of the Android device detection is displayed. When the serial port corresponding to the sub-window is not connected to an Android device, it is displayed as empty, and the background color of the sub-window is white; when the serial port corresponding to the sub-window is connected to an Android device but the detection is not completed, the background color of the sub-window is yellow; when the serial port corresponding to the sub-window is connected to an Android device and the detection is completed, the background color of the sub-window is green, and the detection result data of the Android device is displayed, with one attribute displayed in one line, and a print icon is also displayed.

[0099] For example, if the serial port number for the connection between the Android device and the computer in the embodiment is port_1, then the relevant information and data of the Android device are displayed in the sub-window with the sub-window number 1 in the first row and the first column. After the detection of the Android device in this embodiment is completed, the background color of the window in the first row and the first column is green, and the displayed information is:

[0100] SN: SN_1

[0101] Model: model_1

[0102] IMEI: IMEI_1

[0103] ……

[0104] Display the print icon in the lower right corner.

[0105] The device information printing module 400 is used to print the Android device data detected in this embodiment.

[0106] Click the print icon in the corresponding sub-window of this embodiment, and output the SN, IMEI, RAM, and ROM information of the Android device detected in this embodiment to the selected printing device, usually a label paper.

[0107] Using the desktop application in the present invention, semi-automatic operation of Android device testing can be achieved. As long as the corresponding Android device is turned on in the developer mode and connected to the computer, other operation time can be saved; one computer can be connected to 12 Android devices at the same time, and all connected Android devices can be detected in parallel, directly saving 11 computer devices and 11 person-days of labor per day; a printing function is provided for the detected Android devices. In practice, it is usually printed as a label paper, which can be pasted on the back of the Android device. If you want to obtain the information of the corresponding Android device again after the connection is disconnected, you can directly view it, avoiding repeated detection of the same Android device and saving manpower and material resources; when the device is disconnected from the computer, the information in the corresponding sub-window is automatically cleared, and the idle sub-window and the corresponding serial port can be obtained in time to continue connecting other Android devices for detection, improving resource utilization.

[0108] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0109] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more blocks.

[0110] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more blocks.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more blocks.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent substitutions can still be made to the specific embodiments of the present invention, and any modification or equivalent substitution that does not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.

Claims

1. A method for parallel detection of multiple Android devices based on WPF, characterized in that Including: Based on the access of the Android device, it automatically triggers the device access interface of the desktop application deployed in the computer, automatically obtains the serial port number, Android device ID, and SN accessed by the Android device; the desktop application is designed based on the WPF framework and is in the open state; Based on the serial port number accessed by the Android device, it calls the create thread interface within the WPF framework to start a thread bound to this serial port number, and obtains the detailed information of the Android device through this thread; Displays the Android device ID, SN, and detailed information of the Android device associated with the serial port number in the corresponding sub-window.

2. The multi-Android device parallel detection method based on WPF according to claim 1, wherein It also includes, Connects the Android device to the serial port of the computer through a data cable, and the device access detection interface within the WPF framework is triggered.

3. The method for parallel detection of multiple Android devices based on WPF according to claim 2, characterized in that, The automatic acquisition of the serial port number, Android device ID, and SN accessed by the Android device includes: The triggering of the device access detection interface within the WPF framework causes the desktop application to automatically create a thread for querying the serial bus data of the computer, finds the serial port number connected to the computer, and obtains the ID and SN data of the corresponding Android device through the serial port number.

4. The multi-Android device parallel detection method based on WPF according to claim 3, wherein It also includes extracting the field used to uniquely identify the serial port from the obtained computer serial port number.

5. The method for parallel detection of multiple Android devices based on WPF according to claim 3, characterized in that, Every time an Android device is accessed, the device access detection interface within the WPF framework is triggered once, and at the same time, a thread is automatically created and associated with the serial port number of the accessed computer. The access of multiple Android devices is carried out in parallel.

6. The method for parallel detection of multiple Android devices based on WPF according to claim 1, characterized in that, According to the obtained serial port number, it calls the create thread interface within the WPF framework to start a thread and generate a thread number, Executes the ADB command using the started thread, and according to the configuration file of the detailed information items of the Android device to be obtained, executes the corresponding ADB command one by one to obtain the detailed information of the Android device; The detailed information of the Android device includes at least one of the following: the model of the Android device, the international mobile equipment identification code of the Android device, the running memory of the Android device, and the body storage of the Android device.

7. The method for parallel detection of multiple Android devices based on WPF according to claim 1, characterized in that It also includes: Through the UI framework in WPF, it divides the user interface into vector graphics of sub-windows with the same number as the computer serial port numbers, and each sub-window is bound to a computer serial port number.

8. The parallel detection device for multiple Android devices based on WPF, characterized in that, Including: The device connection information acquisition module is used to acquire the serial port number, Android device ID, and SN accessed by the Android device; The device detailed information acquisition module is used to acquire the detailed information of the Android device; And, The device information display module is used to display the Android device ID, SN, and detailed information of the Android device associated with the serial port number in the corresponding sub-window.

9. The parallel detection device for multiple Android devices based on WPF according to claim 8, characterized in that, The device connection information acquisition module is specifically used for, After the Android device is connected, automatically create a thread to query the serial bus data of the computer, find the serial port number of the serial port connected to the computer, and obtain the ID and SN data of the corresponding Android device through the serial port number; And extract the field used to uniquely identify the serial port from the obtained computer serial port number, and send it together with the ID and SN data of the Android device to the device detailed information acquisition module; The device connection information acquisition module supports creating multiple threads simultaneously to perform parallel detection on multiple connected Android devices.

10. The multi-Android device parallel detection device based on WPF according to claim 9, wherein The device detailed information acquisition module is specifically used for, Call the thread creation interface in the WPF framework according to the obtained serial port number to start a thread and generate a thread number, Use the started thread to execute the ADB command, and according to the configuration file of the detailed information items of the Android device to be obtained, execute the corresponding ADB command one by one to obtain the detailed information of the Android device; And send the obtained detailed information of the Android device together with the serial port number, ID and SN data of the Android device to the device information display module; The detailed information of the Android device includes at least one of the following: the model of the Android device, the international mobile equipment identity of the Android device, the running memory of the Android device, and the body storage of the Android device; The device detailed information acquisition module supports starting multiple threads simultaneously to perform parallel detection on multiple connected Android devices.

11. The multi-Android device parallel detection device based on WPF according to claim 10, characterized in that, The device information display module is specifically used for, Through the UI framework in WPF, divide the user interface into a vector diagram of sub-windows with the same number as the computer serial port number, and each sub-window is bound to a computer serial port number; Display the Android device ID, SN, and detailed information of the Android device associated with the serial port number in the corresponding sub-window; And display the detection status of the Android device; The detection status of the Android device includes: the Android device is not connected, the Android device detection is completed, and the Android device detection is not completed.

12. The multi-Android device parallel detection device based on WPF according to claim 8, characterized in that, It also includes, The device information printing module is used to output all the information of the Android device displayed in the corresponding sub-window to the printing device.

Citation Information

Patent Citations

  • Method and device for testing application programs on Android devices

    CN103713991A

  • Bidirectional concurrent communication method used for intelligent POS machine based on serial port

    CN107945430A