Herunterladen Inhalt Inhalt Diese Seite drucken

Werock Scoria M240 Betriebsanleitung Seite 118

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

To change the broadcast address, do the following:
1.
in the Scanner Configuration app, tap the gear icon in the upper right corner. 2.
2.
then tap on "General Settings
3.
now tap on "Config data brodacst", change the values and confirm the entry with "OK".
Examples of use
Reference library
Add common.aar and lib4710.aar to your project.
Add the following repository in the build.gradle android file:
repositories {
flatDir {
Verzeichnisse
}
}
Add the dependencies
implementation(name: 'common', ext: 'aar')
implementation(name: 'lib4710', ext: 'aar')
!! add permissions
Add
android:sharedUserId="android.uid.system"
Note: After adding the system uid, you need to use the system signature (you can contact the developer to
get it) before it can be used normally.
Initialization
After calling init to initialize, set the callback to complete the scan code
// Initialize the sweep port
Scanner.init(2, mContext);
// Set the scan code completion callback (requires after initialization)
Scanner.setDecodeCallback(new
@Override
public void
onComplete(byte[] data) {
// data is the original data obtained by scanning the code
// Process scan results here
}
});
Monitoring the scan code keys
By default, all physical scan keys always trigger one of the following three groups of transmissions after
being pressed/opened:
static final
String
ACTION_KEYEVENT_SCAN_F_DOWN
static final
String
ACTION_KEYEVENT_SCAN_F_UP
static final
String
ACTION_KEYEVENT_SCAN_L_DOWN
static final
String
ACTION_KEYEVENT_SCAN_L_UP
static final
String
ACTION_KEYEVENT_SCAN_R_DOWN
static final
String
ACTION_KEYEVENT_SCAN_R_UP
You can monitor these three broadcast groups of transmissions, start scanning the code when the down
transmission is triggered, and stop scanning the code when the up transmission is triggered.
You can monitor these three broadcast groups to determine when one of the buttons has been pressed to
Scoria M240 User Manual
'libs'
ito the AndroidManifest.xml file.
DecodeCallback() {
=
=
=
118 / 120
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_F_
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_F_UP
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_UP
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_R_
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_R_UP

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis