CN103927257A - Method and device for triggering android behavior event - Google Patents
Method and device for triggering android behavior event Download PDFInfo
- Publication number
- CN103927257A CN103927257A CN201310016768.3A CN201310016768A CN103927257A CN 103927257 A CN103927257 A CN 103927257A CN 201310016768 A CN201310016768 A CN 201310016768A CN 103927257 A CN103927257 A CN 103927257A
- Authority
- CN
- China
- Prior art keywords
- android
- equipment
- simulator
- message
- port
- 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
Links
Landscapes
- Debugging And Monitoring (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a method for triggering an android behavior event, which comprises the following steps: sending a preset trigger message to an android device or an android simulator; and the android device or the android simulator reads the trigger message and triggers the behavior event corresponding to the trigger message. The method and the device directly send the preset trigger message to the android device or the android simulator, so that the android device or the android simulator reads and triggers the trigger message. The invention solves the problem of low efficiency of manual testing.
Description
Technical field
The present invention relates to Android operating system, be especially arranged on triggering method and the flip flop equipment of the Android behavior event of installing operating system.
Background technology
Android is a kind of freedom based on Linux and the operating system of open source code, is mainly used in portable equipment, as smart mobile phone and panel computer.Android Chinese name is called Android more.The hardware device that Android operating system is installed has at present comprised smart mobile phone and panel computer, also comprises some Android simulators.Due to the fast development of Android operating system, use the people of the hardware device of Android operating system to get more and more, the software that is applied to Android mobile phone or Android panel computer is more and more, and these application all need could issue use through test.
There is now the Android simulator that some can Reality simulation Android equipment.Android (Android) simulator is the simulator that a kind of simulation is provided with Android operating system, and the running environment of its energy Reality simulation Android equipment, with computer hardware analogue mobile phone hardware, realizes the simulation of true Android equipment.By Android simulator can be in computer Android equipment that is virtually reality like reality.By the operation at Android simulator, also can test out the operation conditions of Android equipment.
Traditional test is to use real Android equipment to carry out manual test.The running status of test Android equipment need to be by operating between different Android equipment.Such as answering the call, make a telephone call to and need the Android mobile phone of test could find that whether the function of answering the call of tested Android mobile phone is normal by another Android mobile phone.
Summary of the invention
Object of the present invention, overcome exactly the deficiencies in the prior art, a kind of in computer, test Android equipment or simulator are provided, and do not need to click simulator with test Android operating system or application software by multiple real equipment or by craft, as long as just can realize triggering method and the flip flop equipment of Android behavior event by default triggering message.
In order to achieve the above object, adopt following technical scheme:
A triggering method for Android behavior event, comprises the following steps:
Send default triggering message to Android equipment or Android simulator; Android equipment or Android simulator read described triggering message, and trigger behavior event corresponding to described triggering message.
Further, described default triggering message comprises behavior message and triggers the condition message of corresponding behavior, Android equipment or
Android simulator, according to condition message, triggers behavior event corresponding to behavior message.
Further, default triggering message to the Android equipment or Android simulator of described transmission specifically comprises the following steps: specify the PORT COM of Android simulator or Android equipment, be redirected this PORT COM to computer port; Send described triggering message to the Android simulator corresponding with this computer port or the PORT COM of Android equipment by the port of computing machine.
A flip flop equipment for Android behavior event, comprises sending module, for sending default triggering message to Android equipment or Android simulator; Trigger module, for triggering behavior event corresponding to described triggering message.
Further, described sending module comprises port unit, and it,, for distributing the PORT COM of Android simulator or Android equipment, sets up Android simulator or the PORT COM of Android equipment and being connected of computer terminal port; Transmitting element, sends default triggering message to Android equipment or Android simulator.
Further, described Android equipment comprises mobile phone or panel computer that Android system is installed.
Compared with prior art, beneficial effect of the present invention is:
The present invention directly sends to Android equipment or Android simulator by default triggering message, allows Android equipment or Android simulator read and trigger this triggering message.The invention solves the problem that manual test efficiency is not high.
Brief description of the drawings
Fig. 1 is the flow chart of steps of the triggering method of a kind of Android behavior event of the present invention;
Fig. 2 is the structural representation of the flip flop equipment of a kind of Android behavior event of the present invention.
Diagram: 1-sending module; 11-port unit; 12-transmitting element; 2-trigger module.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, be used for explaining the present invention in exemplary embodiment and description of the present invention, but not as a limitation of the invention.
Refer to Fig. 1, the flow chart of steps of its triggering method that is a kind of Android behavior of the present invention event, comprises the following steps:
S10: send default triggering message to Android equipment or Android simulator.
Particularly, utilize existing ADB instrument to send and trigger message.The English full name of " ADB " is " Android Debug Bridge ", Android debugging bridge.Can in Eclipse, debug Android program by DDMS by ADB, actual is exactly program debugging instrument.Eclipse is an open source code, based on Java can regarded as output controlling platform.The working method of ADB is more special, adopts the mode of monitoring the ports such as Socket TCP5554 allow IDE and QEMU communication, and under default situations, ADB can the relevant network port of daemon, so ADB process will be moved automatically in the time that we move Eclipse.QEMU is the free software of a set of analog processor, and it can simulate the speed that approaches computer processor.Daemon program, is called again finger daemon, conventionally at system backstage long-play, cannot be mutual with foreground owing to there is no control terminal, and Daemon program is generally used as system service.ADB is an inner instrument of Android SDK (Software Development Kit) (Android SDK), with this instrument can direct control management Android simulator or real Android equipment.SDK(Software Development Kit, i.e. SDK (Software Development Kit)).By ADB instrument, can management equipment or the state of mobile phone Android simulator.Can also carry out a lot of mobile phone operations, as mounting software, system upgrade, operation shell-command etc.
Described default triggering message comprises behavior message and triggers the condition message of corresponding behavior.Described behavior message refers to the behavior command that Android equipment or Android simulator can be identified, for example, in the Android operating systems such as the breath of answering the call, collect mail, installation designated program existing behavior command.Described condition message refers to trigger Android equipment or the needed condition of Android simulator act of execution instruction.For example, by ADB, the port of specifying Android simulator is redirected and is assigned on a pc port number by prior art.The order using: " adb.exe-s emulator-5554forward tcp:55544939 ".Wherein adb.exe is the Android debugging bridge that Android kit carries." emulator-5554 " is the Android simulator name of target Android simulator." 5554 " are the communication terminal slogans of target Android simulator, and " 4939 " are redirected port numbers, these two port numbers differences.The PORT COM of port and simulator or Android equipment by setting computer, realizes the connection of computer and simulator or Android equipment.Set up after communication connection, send and trigger message to Android equipment or Android simulator.Triggering message presets, and makes triggering message be sent to by goods equipment or Android simulator according to demand by programming.
S20: Android equipment or Android simulator, according to condition message, trigger behavior event corresponding to behavior message.
Particularly, send and trigger message to Android equipment or Android simulator by ADB.Android equipment or Android simulator trigger corresponding behavior event according to command information.For example, step S10 sends instruction by ADB: " sms send10086test ".Android mobile phone or Android simulator receive this instruction.This instruction comprises 4 parts, and " sms send " is a set form, and actual is exactly behavior message." 10086 " are numbers, and " test " is the content of note.Condition message is that the content of 10086 transmissions is test.While sending this instruction by ADB to communication terminal slogan, Android simulator or Android equipment can receive from 10086 numbers, the note that content is test.Give an example again: the instruction of making a phone call is " gsm call10086 " this instruction." the gsm call " of this instruction is a set form, is the behavior message of the operation of making a phone call." 10086 " are condition message.In the time that Android simulator or Android equipment receive this instruction, show that the phone that is 10086 from number squeezes into.Again for example, the instruction of start-up routine is: " adb.exe-s[Android simulator name] the bag name of shell am start-n[APK]/[run function of corresponding A PK program] ".The bag name of Android simulator name, APK, the run function of corresponding A PK program be all specify parameter, be variable value, other be set form." shell am start " is behavior message, starts the run function of APK bag name or corresponding A PK program.Condition message is the bag name of Android simulator name, APK, the run function of corresponding A PK program.Can specify corresponding Android simulator by Android simulator name, find corresponding program by the bag name of APK, the startup letter of corresponding A PK program.Because these instructions are all the instructions of Android equipment or the identification of Android simulator, can trigger Android equipment or the corresponding behavior of Android simulator by these instructions, thereby whether observe these behaviors normal.
Refer to Fig. 2, it is a kind of flip flop equipment of Android behavior event, comprises sending module 1 and trigger module 2.Described sending module 1 comprises port unit 11 and transmitting element 12.Described port unit 11, for distributing the PORT COM of Android simulator or Android equipment, is set up Android simulator or the PORT COM of Android equipment and being connected of computer terminal port.Port unit 11 distributes Android simulator or Android device talk port, and PORT COM is redirected to computer terminal port, and the communication realizing between the two connects.Described transmitting element 12, sends default triggering message to Android equipment or Android simulator by computer terminal port.Receive this triggering message and trigger behavior event corresponding to described triggering message by trigger module 2.Described trigger module 2 is located at Android equipment or Android simulator.By ADB, can realize being connected of computer and Android equipment or Android simulator.As preferably, described Android equipment comprises mobile phone or panel computer that Android system is installed.
The technical scheme above embodiment of the present invention being provided is described in detail, applied principle and the embodiment of specific case to the embodiment of the present invention herein and set forth, the explanation of above embodiment is only applicable to help to understand the principle of the embodiment of the present invention; , for one of ordinary skill in the art, according to the embodiment of the present invention, in embodiment and range of application, all will change, in sum, this description should not be construed as limitation of the present invention meanwhile.
Claims (6)
1. a triggering method for Android behavior event, is characterized in that, comprises the following steps:
Send default triggering message to Android equipment or Android simulator;
Android equipment or Android simulator read described triggering message, and trigger behavior event corresponding to described triggering message.
2. the triggering method of Android behavior event according to claim 1, it is characterized in that: described default triggering message comprises behavior message and triggers the condition message of corresponding behavior, Android equipment or Android simulator, according to condition message, trigger behavior event corresponding to behavior message.
3. the triggering method of Android behavior event according to claim 1, is characterized in that: default triggering message to the Android equipment or Android simulator of described transmission specifically comprises the following steps:
Specify the PORT COM of Android simulator or Android equipment, be redirected this PORT COM to computer port;
Send described triggering message to the Android simulator corresponding with this computer port or the PORT COM of Android equipment by the port of computing machine.
4. a flip flop equipment for Android behavior event, is characterized in that: comprise sending module, for sending default triggering message to Android equipment or Android simulator; Trigger module, for triggering behavior event corresponding to described triggering message.
5. the flip flop equipment of Android behavior event according to claim 4, it is characterized in that: described sending module comprises port unit, it,, for distributing the PORT COM of Android simulator or Android equipment, sets up Android simulator or the PORT COM of Android equipment and being connected of computer terminal port; Transmitting element, sends default triggering message to Android equipment or Android simulator.
6. according to the flip flop equipment of the Android behavior event described in claim 4 or 5, it is characterized in that: described Android equipment comprises mobile phone or panel computer that Android system is installed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310016768.3A CN103927257A (en) | 2013-01-16 | 2013-01-16 | Method and device for triggering android behavior event |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310016768.3A CN103927257A (en) | 2013-01-16 | 2013-01-16 | Method and device for triggering android behavior event |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103927257A true CN103927257A (en) | 2014-07-16 |
Family
ID=51145482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310016768.3A Pending CN103927257A (en) | 2013-01-16 | 2013-01-16 | Method and device for triggering android behavior event |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103927257A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9936390B2 (en) | 2015-11-19 | 2018-04-03 | Beijing Nanbao Technology Co., Ltd. | Method and apparatus of triggering applications in a wireless environment |
CN108170494A (en) * | 2017-12-28 | 2018-06-15 | 上海传英信息技术有限公司 | A kind of application program launching method and activation system for intelligent terminal |
CN109274511A (en) * | 2017-07-17 | 2019-01-25 | 南京烽火软件科技有限公司 | A kind of novel information delivery system and its dissemination method based on synchronizing information |
CN110969815A (en) * | 2018-09-28 | 2020-04-07 | 北京国双科技有限公司 | Alarm method and device based on android device |
CN115576229A (en) * | 2022-08-12 | 2023-01-06 | 深圳方位通讯科技有限公司 | Automatic testing method, terminal equipment and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070240118A1 (en) * | 2006-02-28 | 2007-10-11 | Ido Keren | System, method, and software for testing a software application |
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102355641A (en) * | 2011-08-25 | 2012-02-15 | 广东欧珀移动通信有限公司 | Method for carrying out automated test on group control of short messages |
CN102779042A (en) * | 2012-06-26 | 2012-11-14 | 奇智软件(北京)有限公司 | System and method for supporting mobile terminal shortcut operation |
CN102833376A (en) * | 2011-06-17 | 2012-12-19 | 上海晨兴希姆通电子科技有限公司 | Implementation method of one-click dial for mobile phone with Android platform |
-
2013
- 2013-01-16 CN CN201310016768.3A patent/CN103927257A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070240118A1 (en) * | 2006-02-28 | 2007-10-11 | Ido Keren | System, method, and software for testing a software application |
CN101241466A (en) * | 2007-02-08 | 2008-08-13 | 深圳迈瑞生物医疗电子股份有限公司 | Embedded software test method and system |
CN102833376A (en) * | 2011-06-17 | 2012-12-19 | 上海晨兴希姆通电子科技有限公司 | Implementation method of one-click dial for mobile phone with Android platform |
CN102355641A (en) * | 2011-08-25 | 2012-02-15 | 广东欧珀移动通信有限公司 | Method for carrying out automated test on group control of short messages |
CN102779042A (en) * | 2012-06-26 | 2012-11-14 | 奇智软件(北京)有限公司 | System and method for supporting mobile terminal shortcut operation |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9936390B2 (en) | 2015-11-19 | 2018-04-03 | Beijing Nanbao Technology Co., Ltd. | Method and apparatus of triggering applications in a wireless environment |
US9942763B2 (en) | 2015-11-19 | 2018-04-10 | Beijing Nanbao Technology Co., Ltd. | Method and apparatus of triggering applications in a wireless environment |
CN109274511A (en) * | 2017-07-17 | 2019-01-25 | 南京烽火软件科技有限公司 | A kind of novel information delivery system and its dissemination method based on synchronizing information |
CN108170494A (en) * | 2017-12-28 | 2018-06-15 | 上海传英信息技术有限公司 | A kind of application program launching method and activation system for intelligent terminal |
CN108170494B (en) * | 2017-12-28 | 2021-12-17 | 上海传英信息技术有限公司 | Application program starting method and starting system for intelligent terminal |
CN110969815A (en) * | 2018-09-28 | 2020-04-07 | 北京国双科技有限公司 | Alarm method and device based on android device |
CN115576229A (en) * | 2022-08-12 | 2023-01-06 | 深圳方位通讯科技有限公司 | Automatic testing method, terminal equipment and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109740222B (en) | Testing device and system for automobile networking scene | |
CN103927256A (en) | Method for controlling multiple Android devices | |
CN103927257A (en) | Method and device for triggering android behavior event | |
KR20100041447A (en) | Apparatus and method for automatic testing of softwares or digital divices | |
CN108170494B (en) | Application program starting method and starting system for intelligent terminal | |
US20080077370A1 (en) | System and method for integrating a process control system into a training simulator | |
CN104268074A (en) | Application software online debugging method based on DCS | |
CN108804313B (en) | Method and device for remotely debugging program and server | |
CN103268288A (en) | Remote real machine debugging method and system of mobile terminal application software | |
CN105740139B (en) | A kind of debugging embedded software method based on virtual environment | |
CN103176899A (en) | Mobile phone emulator and method for emulating mobile phone functions on host machine | |
CN102662648A (en) | Embedded software development simulation platform of communication terminal and application thereof | |
CN111459506B (en) | Deep learning platform cluster deployment method and device, medium and electronic equipment | |
CN101800910B (en) | Simulation system, PC side simulator and mobile phone side agent client | |
US11958511B2 (en) | Train signal system and linkage method therefor | |
CN113657069B (en) | SOC simulation verification method and device, verification server and storage medium | |
CN109542524B (en) | Linux and android mutual fast switching method | |
CN111142885A (en) | eSIM device management method, device, equipment and storage medium | |
CN114416578A (en) | Test method and device | |
CN109634856B (en) | IOS intelligent terminal remote real machine debugging system and method based on cloud service | |
CN113609051A (en) | Hot plug method, system, device and computer storage medium for expansion board | |
CN107453959B (en) | Network card management method and device | |
CN204406390U (en) | A kind of Monkey test macro | |
CN103246607B (en) | The emulation test method of aerial camera address bit pattern communication interface | |
CN102567003A (en) | Method for debugging and realizing services in telecom value added service development environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20140716 |
|
RJ01 | Rejection of invention patent application after publication |