Display virtual keyboard with barcode scanner attached - ios

We have written an enterprise app for a wholesaler client. The app directs their warehouse staff to different locations in the warehouse, telling them which products to pick.
The app allows the picker to double check they are picking the correct product by entering the barcode of the product they have picked up. The client has purchased a USB barcode scanner that allows them to scan directly into the app. The scanning of the barcode and validation works fine. The problem comes when the picker needs to enter the number of units they have picked up. They can't do it because the virtual keyboard has been hidden.
The virtual keyboard is hidden because (I assume) iOS thinks the barcode scanner is a hardware keyboard. Is there a way to force the virtual keyboard to remain on screen?
I have searched, but the various solutions either do not work for iOS8, or use private APIs (which I've not attempted to implement, as they look pretty ropey).
If this is not solve-able programatically, I am happy to advise the client to use a different scanner (I have seen some which seem to have a button press to bring up the virtual keyboard, etc). If you happen to know of a scanner that does this, please advise!
I realise I could use the camera on the device, but I don't think the client will go for this as the device is attached to a forklift and wouldn't be practical to pick up and scan all the time.
tl;dr: I'm trying to force the virtual keyboard to stay on screen because it is hidden when the barcode scanner is attached.

Related

How to detect the Smart/external Keyboard on iPad?

How can one get a notification when a (Smart) keyboard is connected?
Some context:
I am working on a feature that automatically shows and hides my software keyboard based on whether the iPad Pro Smart Keyboard, or another external keyboard is connected or not (like Pages). I have seen this answer but that only applies when a textfield is selected. After a lot of googling, I stumbled into the Apple's ExternalAccessory class which you can ask for connected devices, and then check what these devices are.
I have tried a basic implementation of this and I can't get it to work on my iPad Pro with connected Smart Keyboard (Yes, I am sure it's connected because I can see the letters I type appear on my screen 😅).
First of all, the docs say that you can detect devices that are through over Bluetooth and Lightning, I can only to hope this also includes the Smart Keyboard connector. I have enabled the Wireless Accessory Configuration capability of my project.
Second, one needs to add the UISupportedExternalAccessoryProtocols key to their info.plist, then needs to specify which protocols are connected. Which protocols there are doesn't seem to be documented, also not for Apple's own devices. I ran into a tutorial that mentioned the iAP2 bluetooth protocol, so I added this and then hoped for the best.
My code
As I haven't set up my project configuration right yet, I didn't add a lot of code either. I tried:
func printAllAccessories() {
for device in EAAccessoryManager.shared().connectedAccessories {
print("connected device with name: ", device.name)
}
}
But noting seems to be connected.
Bottom line
What is the process, including project configuration, to get external keyboard notifications in an iOS App?
There doesn't seem to be any comprehensive documentation of this online so it's probably nice to get that here. Any help would be highly appreciated!
First of all this doesn't work because smart connector is not using bluetooth to connect to device. You can read more about that on this page Use your Smart Keyboard Folio or Smart Keyboard with iPad Pro.
Second thing is that apple Smart Keyboard and external keyboard is totally different thing. Apple Smart Keyboard can be used as iPad case and as iPad keyboard. External keyboard is used only as keyboard and nothing else.
So from this we can conclude that when you connect you Smart Keyboard to iPad with Smart Connector iPad will treat it as iPad case, which gives you protection for your iPad and no other functionality which would impact on your software(try to type on it or use any shortcuts, nothing will work). iPad will recognise Smart Keyboard as keyboard only when it will be folded in type position. This is the main difference from external keyboard. External keyboard will be recognised as soon as you connect it via bluetooth.
Pages app will hide keyboard only if the external keyboard is connected via bluetooth or your Smart Keyboard is in type position. If Smart Keyboard is connected to Smart Connector and is not in type position there will still be software keyboard until you fold it in to type position. This means that iOS will handle hiding and showing keyboard.
For handling key presses performed on hardware keyboard you can refer to this class UIKeyCommand.

iOS - How to make custom keyboard extension work with physical keyboard

I have had this question for a long time and I tried to search it in iOS 10 APIs but I couldn't find any, if anyone knows the corresponding APIs, please help here.
So I have an iOS custom keyboard for Mandarin and it requires selecting word after some inputs.
Google's custom keyboard GBoard now supports Simplified Chinese and it works with iPad Pro Smart Keyboard and it will display a list of candidate words right below the cursor as shown in this video.
GBoard Simplified Chinese Input
But I couldn't find the corresponding API to make this happen for my own custom keyboard extension.
So 2 questions here:
Is it doable now to make a custom keyboard extension work for external physical bluetooth keyboard, and how? Not iPad Pro Smart Keyboard but generally using Apple bluetooth keyboard with say an iPad Air.
If #1 it not doable now, how can I make my custom keyboard work like GBoard so that when the user types some english chars, the candidate list will appear right below the cursor and then use arrow keys to navigate and enter to input.
Much appreciated.

What changes must be done to use the blackberry application code to work on Blackberry touch?

Hi I have been working on a blackberry app and developed about 90% of the app .But my client wants the app should work on blackberry touch also. So I just wanted to know what changes I will need to do to convert the same code to work on blackberry touch .Please help me I am new to Blackberry app development .
Just to confirm, we are talking about a Java application running on BB7 or earlier OS.
The short answer is, it depends.
If you have used standard RIM controls (buttons, ObjectChoiceField etc.) then these will work on the touch screen with no change. If you have used your own controls, for example an image button, then these might not work very well - for example the button might not be big enough to be hit easily with a fat finger.
The other problem is the virtual keyboard, it may appear at points when you do not want it to and not appear when you do. Not a problem on a lot of phones, but remember there are at least 2 non keyboard phones out there, so the Virtual keyboard is the only option for typing.
The best approach is work through each of your screens and try them in the Simulator. Zoom the Simulator so that it looks like the real device. And pretend you are using a finger, don't rely on the mouse because you can position the mouse very accurately.
I would raise new questions about specific Fields that you have problems with, rather than continue this with any issues you find.

How to detect that Android Camera Geo tagging setting is on/off (GPS Info in the EXIF data)

I'm trying to find out if there's a way to detect the "geotag" or "store-location" setting of the camera on an Android device. I don't mean the general location access setting which I'm very familiar with, but the more "hidden" setting when you use the camera.
Most users are not even aware it exists, and it's turned off by default, I would like to be able to tell the users that this setting is off so that they can turn it on if they want to, this way pictures will have all the EXIF data concerning their location.
I hope this has not been answered before on so, if its the case, I'm sorry about it and would you please link me to the right thread.
Each Android device usually ships with its own custom camera app, made by the manufacturer of that device. Each has their own UI and probably own way/place to store this setting, if it even exists for that device. So any answer to this question would be heavily device-dependent.
But even if you just restrict yourself to the AOSP camera app, which is the app used on the Nexus devices, there's no API for this. The app asks if you want to enable GPS tagging the first time the app is run, and after that the option to enable/disable geotagging can be found in the settings.
There's no way to confirm if that setting is on, since it's not part of any public or standard Android API. You might be able to do something with the accessibility API to read these settings, but it requires substantial permissions to do so (Accessibility service documentation here).
To extract the EXIF information from the files, you could consider an example similar to the updateExif example shown in this code snippet. This would enable you to get all the information including make, flash, focal length etc which is stored in the EXIF file.
Speaking to the Android 4.3 camera app that comes with Nexus devices, you can view and change the setting like this:
Open the camera app.
The white circle (rightmost of three icons at bottom of app screen) is used to bring up the main menu. If "store location" is turned off, that circular icon will be displayed with a small location icon with a line through it. If "store location" is turned on, there is no positive indication thereof. Tap it to continue if you want to change the setting.
Tap the settings icon (middle icon of five) to bring up "More Options" menu.
The "store location" icon is the leftmost of five. Tapping that icon toggles the setting (and dismisses the menu). If "store location" is off, that icon is displayed with a line through it, else without.

How to display virtual keyboard when a physical keyboard is connected

Is there a way to programmatically force the virtual keyboard to appear when there is a bluetooth keyboard connected to the iPad?
I have a bluetooth barcode scanner connected to the iPad, which acts as HID (keyboard). The problem is, the virtual keyboard stays hidden in my app. Is there any way I could force the virtual keyboard to show without using any unofficial SDK calls?
Darn I was hoping someone would be able to answer this question! Goran have you been able to find anything since July?
I have one idea, although I'm not sure whether it works or not... Apparently the Apple bluetooth keyboard has a shortcut that opens the virtual keyboard. If, using javascript, you can send this command to the iPad, the virtual keyboard will open?? Is this possible?

Resources