Finish v_1_9_6(100)

This commit is contained in:
Valerio Castellana 2019-11-20 11:40:18 +01:00
commit 708e9476ce
4 changed files with 6 additions and 4 deletions

View File

@ -17,8 +17,8 @@ apply plugin: 'com.google.gms.google-services'
android {
def appVersionCode = 99
def appVersionName = '1.9.5'
def appVersionCode = 100
def appVersionName = '1.9.6'
signingConfigs {
release {

View File

@ -12,7 +12,7 @@ public class BaseActivity extends AppCompatActivity {
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) {
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
}
}

View File

@ -20,7 +20,7 @@ public class BaseDialog extends Dialog {
super(context);
if (BarcodeManager.isEnabled() && BarcodeManager.isKeyboardEmulator()){
setOnKeyListener((dialog, keyCode, event) -> {
if (mBarcodeListener && event.getAction() == KeyEvent.ACTION_DOWN && !isControlKey(event)) {
if (mBarcodeListener && (event.getAction() == KeyEvent.ACTION_DOWN || event.getAction() == KeyEvent.ACTION_MULTIPLE) && !isControlKey(event)) {
return BarcodeManager.onKeyDown(event.getKeyCode(), event);
}
return false;

View File

@ -64,6 +64,8 @@ public class KeyboardEmulatorBarcodeReader implements BarcodeReaderInterface {
mLastCharInsertTime =keyEvent.getEventTime();
if (keyEvent.getUnicodeChar() > 0){
mTextBarcode+= (char) keyEvent.getUnicodeChar();
}else if (keyEvent.getCharacters() != null){
mTextBarcode = keyEvent.getCharacters();
}
}
}else{