You can send events to the Emulator in console (terminal) using the Event Injector CLI tool. The tool is functionally similar to the Event Injector view.
Figure: Using Event Injector in a console
To start the Event Injector, use the following command in the Emulator installation directory at the command line:
$./bin/eventinjector
>bin\eventinjector.bat
To create events:
eventinjector [options] -- device command [args]
The following command options are available:
// If a single Emulator is running eventinjector // If several Emulators are running eventinjector --connect [Emulator port or name] // Start the Event Injector >> device command [args]
Figure: Event Injector in session mode
The following device commands are available:
Sensor devices: acceleration, magnetic, gyro, proximity, and light
For example:
sensor set accel 1.0, 1.0, 1.0
Motions: double tap, snap, and shake
For example:
motion set double-tap
For example:
battery level 80
For example:
earjack set 4wire
For example:
usb set on
If this value is 0, call and SMS events do not work.
For example:
rssi set 3
For example:
sdcard mount sdcard_4G.img
For example:
location set -90 100
For example:
sms send 01012341234 hello
For example:
call dial 1234 call list
Events:
For example:
nfc messag add well-known,U,1,www.naver.com nfc tag attach type1
This has the same functionality as the -- emulator option.
This has the same functionality as the -- help option.