Can I create a button that starts Voice Dictation mode in iOS? - ios

I understand this is a bad idea (to show a voice dictation button in the app when it's already on the keyboard when it's available). But I have a client who would really like to have a microphone icon in a text field that would enter voice dictation mode when pressed.
Note, I am talking about the standard OS voice dictation mode (that the keyboard controls).
So the basic question is:
Can I tell the keyboard to enter voice dictation mode?
(my guess is that it's not allowed, but I would love something more "official" than my gut)

This wouldn't be possible unless you were to jailbreak your device. There would be little reason for Apple to offer a public API to do this, because any time you would be able to invoke it is when the keyboard is showing anyway, which would contain the button to activate it.

Related

Default keyboard is not coming when Barcode Scanner Device is Connected by Bluetooth in IOS

I am facing issue with keyboard when barcode scanner device is connected using bluetooth.
Flow:
1) I have turned on Bluetooth, and connected barcode scanner device using bluetooth by entering displayed code in it to connect.
2) I am able to use scanner, but the default keyboard is not displaying even we call becomeFirstResponder.
3) When I disconnect the scanner device or turn off bluetooth connectivity then the keyboard is coming.
Note: Below is the link for the Barcode Scanner device i am using
Barcode Scanner Device Information
Anyone faced this kind of issue?
Please suggest how to fix this issue.
Thanks in Advance..!
This solution only works on Ipad. when the soft keyboard disappears just press and hold the down arrow on the bottom right of the screen and the soft keyboard will be back.
We are clear and there is no question that Bluetooth Scanner is pretending to be a Bluetooth keyboard, so iOS thinks that it does not need to show the on screen one.
For Barcode Scanner type socket mobile are now adding a feature to open the iPad onscreen keyboard. For example, the Socket CHS has a new button press option. You can check if your device have the same functionality*(It is likely to be of some help)*
Bring Up the Virtual Keyboard With a Real Keyboard can be a good idea.
When you have a Bluetooth keyboard connected to your iPad, the virtual keyboard will cease to appear. (This is a good thing.) However, what if, for some random reason, you needed that virtual keyboard? Don't unpair your Bluetooth. Just... Hit the eject key on Apple's physical keyboard. It'll bring up the virtual one.
There is another way to try to solve this, personally I tried it and it was very unstable. Taking into account that it is a kind of hack, expected unstable behavior.
This answer to a related question (https://stackoverflow.com/a/3837131/493988) has what seems like a hack based on a UITextField's inputAccessoryView.
Even the user #Kurt Arnlund in this answer mentions a external app called KeysPlease link here. I really have not tried it, you can try.
In summary, there seems to be a clean way to solve this, I think these may be the best attempts to reach a solution
Sources:
Bluetooth Scanner sets system-wide keyboard, UITextFields wont show soft keyboard on responder
Force on screen keyboard to show when bluetooth keyboard connected
Show iPhone soft keyboard even though a hardware keyboard is connected

Programmatically "tap" the Microphone key on the iOS keyboard [duplicate]

I'd like to programmatically put my UITextField input into dictation mode, without requiring the user to bring up and select dictation from the keyboard. Searched the API documentation but can find no solution. Any ideas?
This is currently not possible on iOS.
The only place where it is kind of possible is in an app using WatchKit. In WKInterfaceController you can actually use presentTextInputControllerWithSuggestions with nil as parameter which starts dictation input immediately.
Yes
With iOS 10 Apple added SFSpeechRecognizer which allows for starting speech recognition without user interaction.
You have to implement SFSpeechRecognizer, use Accelerate framework to get mic sound level floats and make an animated view yourself. It will look cooler!
Sorry for not providing the code, I think i lost it. Can’t find it on my multiple hard drives :/

How to check whether Dictation is enabled in iOS Keyboard.?

I have to show an Image highlighting the Mic icon in iOS keyboard saying "Tap here to speak". But the Mic icon won't be displayed if dictation is disabled in Keyboard settings.
My aim is to check whether dictation is enabled at the time of launching the app. If not, I want to show a prompt to Enable Dictation from "Settings>KeyBoard>Enable Dictation"
Is there any way to check whether dictation is enabled when the app is launched.?
Short answer is that checking whether the dictation is enabled is not possible.
Currently there are only few things that developers can play with in terms of dictation. They are defined in UITextInput Protocol. Sadly, what you're looking is not there.

How to convert Speech to Text in ios SDK

I am working on project its requirement is convert human voice to text , but I heard that in ios 5.1 they have added this new feature .
can any one help me to how to integrate this new feature in my application with a small example .
Thanks in Advance.
saroj.
You don't need to do anything to integrate it into your app - any UITextField or UITextView that the user taps into brings up the keyboard, and this has a microphone icon to the immediate left of the spacebar. The user taps this, does their talking, and taps again. The speech to text is done by Apple's servers, so it takes a few seconds, maybe longer when on a slow connection. While this is happening, there will be three purple coloured circles displayed in the text field to denote that speech to text is happening. These are then replaced with the text that is returned from Apple. Note that if you have no network connection (e.g. wifi off, airplane mode, or just no mobile signal available), then the button is removed from the keyboard. So just note that you have no access to text-to-speech when offline.

Show virtual Keyboard when bluetooth keyboard connected?

I am building system for my company that use of a bluetooth RFID reader.
The problem is we cannot show the keyboard when the reader is connecting unless we turn it off.
But I saw this video
http://www.youtube.com/watch?v=0uRlIw5H0wE&feature=related
And I know we can modify the reader to temperately show the keyboard.
(Just like the button on Apple iOS keyboard)
We can ask the provider to taylor-made the reader. So we want to add a physical button on it.
Do anyone know the keycode of that button?
Can it be done just to add a button to send a keycode event???
The button that needs to be pressed is the eject button that's on a mac keyboard. I don't know what the key code is or even if you can send it. But I do know it is the eject button.
The iOS keyboard gets hidden when a bluetooth or some other physical keyboard gets connected.
I think that the button is causing the Bluetooth HID-keyboard profile to disconnect at the scanner (which in-turn enables the iOS keyboard)
I have added details on how to show both bluetooth keyboard(using HID profile) and device virtual keyboard here I want to force keyboard on with bluetooth device please check if it helps.

Resources