Open crobinson42 opened 4 years ago
Here is our initialization configuration:
private void init() {
if(!isDatalogic()) { return; }
// If the decoder instance is null, create it.
if (decoder == null) { // Remember an onPause call will set it to null.
Log.d(TAG, "onHostResume: new BarcodeManager()");
decoder = new BarcodeManager();
// Pass it to ScannerProperties class.
// ScannerProperties cannot be instantiated directly, instead call edit.
configuration = ScannerProperties.edit(decoder);
configuration.interleaved25.enable.set(true);
configuration.interleaved25.lengthMode.set(LengthControlMode.RANGE);
configuration.interleaved25.Length1.set(25);
configuration.interleaved25.Length2.set(46);
// Now we are ready to store them.
// Second parameter set to true saves configuration in a permanent way.
// After boot settings will be still valid.
int errorCode = configuration.store(decoder, true);
// Check return value.
if(errorCode != ConfigException.SUCCESS) {
Log.e(TAG, "Error during store", ErrorManager.getLastError());
} else {
Log.d(TAG, "Datalogic decoder config saved");
}
}
if (!listenerSetup) {
Log.d(TAG, "setting up listener");
// From here on, we want to be notified with exceptions in case of errors.
ErrorManager.enableExceptions(true);
try {
// Create an anonymous class.
listener = new ReadListener() {
// Implement the callback method.
@Override
public void onRead(DecodeResult decodeResult) {
// Change the displayed text to the current received result.
Log.d(TAG, "onRead: " + decodeResult.getText());
emitJSEvent(SCANNER_DATA, decodeResult.getText());
}
;
};
// Remember to add it, as a listener.
decoder.addReadListener(listener);
listenerSetup = true;
} catch (DecodeException e) {
Log.e(TAG, "onHostResume: Error while trying to bind a listener to BarcodeManager", e);
emitJSEvent(SCANNER_ERROR, e.getMessage());
}
}
}
Cory,
It is unclear to me if it happens simply after a scan button press or after a barcode read. In the latter case please consider that by default the keyboard wedge feature is enabled and so when you read a barcode your app could receive keyboard events. Keep attention to the postfix string that by default is set to
Regards,
Da: Cory Robinson notifications@github.com Inviato: giovedì 13 agosto 2020 19:51 A: datalogic/datalogic-android-sdk datalogic-android-sdk@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Oggetto: [datalogic/datalogic-android-sdk] Scan trigger gives focus to the top left pressable button on screen (#7)
Our app is running on the latest Datalogic Memor 10 and there is an issue with the scanner event causes the left header back button to be focused when the user presses the scan trigger.
Is there configuration for this issue or is this a bug?
- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdatalogic%2Fdatalogic-android-sdk%2Fissues%2F7&data=02%7C01%7CLamberto.Leoncavallo%40datalogic.com%7C75d00b9d37674e9af66f08d83fb17a7b%7Cfa92fa5ade6c4cafa2aef13cb9d1c40a%7C0%7C0%7C637329378780654828&sdata=8gvBGb0sCNXbhWcqpt20pX1PU8i7%2B05hLlA988ig6Iw%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADVTLBAQU3LQPW4PTMQ3TBDSAQRZBANCNFSM4P6WCATQ&data=02%7C01%7CLamberto.Leoncavallo%40datalogic.com%7C75d00b9d37674e9af66f08d83fb17a7b%7Cfa92fa5ade6c4cafa2aef13cb9d1c40a%7C0%7C0%7C637329378780654828&sdata=aAOU7jNr9c9fH53%2FSc13rDMmWMJpXwgclMwfsS7Fl3o%3D&reserved=0.
Datalogic Confidential Internal
</a/
Our app is running on the latest Datalogic Memor 10 and there is an issue with the scanner event causes the left header back button to be focused when the user presses the scan trigger.
Is there configuration for this issue or is this a bug?