Issue preventing soft keyboard from showing up when focusing an input

The app that i am developing has to support a device that has a barcode scanner embedded, so i have to focus an input but prevent the native soft keyboard from popping up. This is the code that i am using to focus the element:
$timeout(function () { element[0]['focus'](); });

I have also included the following line in the config.xml file, hoping it would help:
<preference name="KeyboardDisplayRequiresUserAction" value="true" />

I haven’t had any luck doing this so far, the best solution i came up with is to hide the keyboard as soon as it is displayed, but it is not the best solution since it would appear on the screen for a short time.

Any help would be much appreciated. Thanks