Scoria M240 User Manual
118 / 120
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
'libs'
}
}
Add the dependencies
implementation(
name
:
'common'
,
ext
:
'aar'
)
implementation(
name
:
'lib4710'
,
ext
: 'aar
'
)
!! add permissions
Add
android
:sharedUserId
="android.uid.system"
ito the AndroidManifest.xml file.
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
DecodeCallback
() {
@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
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_F_DOWN"
;
// Scan code F key DOWN broadcast
static final
String
ACTION_KEYEVENT_SCAN_F_UP
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_F_UP"
;
// Scan code F key UP broadcast
static final
String
ACTION_KEYEVENT_SCAN_L_DOWN
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_DOWN"
;
// Scan code L key DOWN broadcast
static final
String
ACTION_KEYEVENT_SCAN_L_UP
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_L_UP"
;
// Scan code L key UP broadcast
static final
String
ACTION_KEYEVENT_SCAN_R_DOWN
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_R_DOWN"
;
// Scan code R key DOWN broadcast
static final
String
ACTION_KEYEVENT_SCAN_R_UP
=
"com.android.action.keyevent.KEYCODE_KEYCODE_SCAN_R_UP"
;
// Scan code R key UP broadcast
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
Страница 1: ...Copyright 2022 by WEROCK All Rights Reserved Scoria M240 User Manual ...
Страница 17: ...Scoria M240 User Manual 17 120 ...
Страница 24: ...Scoria M240 User Manual 24 120 ...
Страница 77: ...Scoria M240 User Manual 77 120 4 Now lift the battery by the tab provided and remove it ...
Страница 83: ...Scoria M240 User Manual 83 120 4 Now lift the battery by the tab provided and remove it ...