EasyManua.ls Logo

Sunmi L2 - AIDL Scanner Interface Methods

Sunmi L2
18 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Shanghai Sunmi Technology Co., Ltd. Sweeping Development
- 5 -
2.3. AIDL Interface
No.
1
2
3
4
Custom the trigger key
fuction:void sendKeyEvent(KeyEvent key)
parameter:
key → KeyEvent
action=KeyEvent.ACTION_UP:start scan
action=KeyEvent.ACTION_DOWN:stop scan
Example:
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Example: Use the X key value as the trigger sweep key.
if (event.getKeyCode() == x) {
scanInterface.sendKeyEvent(event);
}
return super.dispatchKeyEvent(event);
}
Start scan
fuction:void scan( )
Note:Need to work with the stop() method to start identifying scan codes.
Example:
scanInterface.scan();

Related product manuals