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
fuctionvoid sendKeyEvent(KeyEvent key)
parameter
key KeyEvent
action=KeyEvent.ACTION_UPstart scan
action=KeyEvent.ACTION_DOWNstop 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
fuctionvoid scan( )
NoteNeed to work with the stop() method to start identifying scan codes.
Example
scanInterface.scan();

Related product manuals