Utilize Q1 Buttons
Keyboard Description
Key | Value | Description |
---|---|---|
Period | KeyEvent.KEYCODE_PERIOD | Black dot button on the right-bottom of the keyboard |
QRCode | 232 | Orange button on the middle-bottom of the keyboard |
Back | KeyEvent.KEYCODE_ESCAPE | Red 'X' button on the left-bottom of the keyboard |
Scan | 229 | Orange button on the left of the LCD |
Delete | KeyEvent.KEYCODE_DEL | Yellow triangle button on the right-top of the keyboard |
Enter | KeyEvent.KEYCODE_ENTER | Green circle button on the right-bottom of the keyboard |
Digital Buttons: Other buttons are standard digital buttons as defined in android.view.KeyEvent.
Scan Button and QR Code Button Usage
Function: These buttons quickly launch scan applications.
Process:
Pressing either button prompts the system to search for installed applications with a scan intent-filter.
If multiple applications are available, the system displays a list for user selection.
The selected application will start. The code for the scan intent-filter is as follows:
Note: If no application with the scan intent-filter is installed, pressing these buttons has no effect.
Implementation in Applications
1. Defining Intent-Filter:
To use the scan button and the QR code button, your application must define a scan intent-filter in the Android manifest file.
Specify both the category and action.
2. Handling Button Press:
When the button is pressed, the active top task receives the key value.
Implement the logic in the application's 'onKeyDown' function override.
Last updated