Currently I'm building an app with the react-native-keyevent
package which is working fine and grabs the appropriate key events from a HID 2D HoneyWell barcode scanner. The issue is I've came across a barcode in PDF417 format with some encrypted data embedded, and whenever this is scanned by the device and processed through android, somewhere along the lines the screen shot function is triggered system wide. This doesn't seem like an app issue, more so a system wide android issue as this can be reproduced anywhere on any screen.
My question is is there a way to 'Consume' these key events to prevent such fuzzy inputs where the characters are non Unicode/ASCII but is instead raw hexadecimal input so this is disabled on a system level? All permissions are available on the managed device (ELO Backpack) and are automatically granted as needed.
I understand I may set FLAG_SECURE
on WindowManager
, however I am looking to eliminate any unintentional processing of such input as this may cause other unexpected results such as this.