How to integrate handwriting input for numbers in my android app? - android

My design team suggested that users have an extra option to input numbers in the form fields by switching android keyboard in to handwriting mode. For example user can able to enter 7000 by writing on keyboard.
How can I achieve this in my android application?

THey may not be able to. There's no promise that any keyboard has a handwriting mode. Luckily you don't really need to- if the user wants to switch to handwriting mode and the keyboard supports it, they can do so themselves. But there is no way to open a keyboard in handwriting mode, because the Android OS doesn't have the idea of handwriting mode. It doesn't know or care how a keyboard accepts input.

https://github.com/phatware/WritePadSDK
http://www.heatonresearch.com/encog/
Try these libraries for android .

Related

Virtual keyboard for Angular on mobile devices

I am struggeling on a question of my client to use a custom keyboard on my webapplication on a mobile device. That keyboard should only have all the digits, a dot, a backspace and an enter. Nothing more, nothing less.
I know you can use the different HTML5 input types (tel, number,...) to get a different keyboard of the Mobile Operating System, but these keyboards are different on each Mobile Operating System (Android, IOS, Windows Mobile): http://mobileinputtypes.com/ - Using the type 'tel' on IOS is ok, but on android I get a whole lot of other options that are not necessary. Same goes for 'number'...
I know it is not possible to customize the default keyboard of an Mobile Operating System.
I have found the plugin http://the-darc.github.io/angular-virtual-keyboard/ that at first sight does the job (look at the Numeric keyboard with customized css example). The only problem is that on mobile the default keyboard of the Mobile Operating System always pops up.
Is there a way to not show the default Keyboard or are there any other options that you can think of?
Thanks for the help, much appreciated!

Disable speech to text button (Micro phone) on soft input keyboard in android programmatically

Thanks in advance for the help.
I am developing an android application for research purposes and need to disable the speech to text button on the soft input keyboard. The reason for this is due to concurrency issues that arise since the application I am developing uses the microphone. I understand that for a general application disabling keys is generally seen as impossible (since users may change default keyboards). I know for a fact that the default keyboard will be used.
With this in mind is it possible to disable certain keys? I believe that at the least I should be able to specify the input type such that the microphone button is hidden. I say this because if I disable speech to text in the settings (not programmatically, but manually as a user) the microphone icon is removed from the keyboard. I'm open to any possible solution (with the exception of not using the default keyboard) as this application will not appear on the play store.
You can't force the user input through anything other than pre-defined keyboards that already exist in the user's device.
The only way you could get around this is by programming your own custom, on-the-fly keyboard, and that is a very bad idea.
Just disable voice input programmatically by using XML declarations in the EditText you're looking at. You can do this with the attribute:
android:privateImeOptions="nm" // nm stands for No Microphone.
If you want to set it programmatically you can try this::
// deprecated i guess
edt_txt.setPrivateImeOptions("nm");
// this one is new but it works only with Google Keyboard.
edt_txt.setPrivateImeOptions("com.google.android.inputmethod.latin.noMicrophoneKey");
You can combine values in PrivateImeOptions parameter in CVS form so best option is to use:
edt_txt.setPrivateImeOptions("nm,com.google.android.inputmethod.latin.noMicrophoneKey");
Take a look through here and see if you can find what you're looking for.
More info about Google Keyboard here -> look for method setOptions
To disable microphone button on multiple keyboard. Use property
android:privateImeOptions="nm"
But it will not work for Gboard(google native keyboard)
To disable on microphone on Gboard use
android:privateImeOptions="nm"
editText.setImeOptions(IME_FLAG_NO_PERSONALIZED_LEARNING)
Just use this in your editText on the layout file:
android:imeOptions="flagNoPersonalizedLearning"

Android soft keyboard in Chinese languages

I wanted to open soft keyboard in Chinese languages in my android application which supports localization. Can any one please help me out.
There is no way to do it. The Keyboard is separated app and you have no way to tell it what language you want. Except situation when a keyboard has api's to do it. Your only variant in to write your own internal keyboard.
Anyway, if a system locale is Chinese - user in most cases already have Chinese keyboard so you don't need to worry about it.

Force android to display email type keyboard in HTML5 page based web application

I have designed an HTML5 page which consists of a input box of type email. This HTML5 page will be displayed in Android application in a webview.
<input type="email" autofocus id="emailid"/>
The problem I'm facing is that Android doesn't show the email type keyboard which has the "#" and ".com" symbol by default.
How to force Android to display email type keyboard using any of these?
Thanks in advance :)
Currently, HTML5 is not fully supported on devices running 2.2 or below.
These are not supported:
input type=search
input type=tel
input type=url
input type=email
input type=datetime
input type=date
input type=month
input type=week
input type=time
input type=datetime-local
input type=range
input type=color
input type=checkbox
input type=image
textarea
select
datalist
keygen
output
progress
field validation
form validation
APIs
Spellcheck attribute
Session history
Geolocation
Device Orientation
FileReader API
Local Storage
Access the camera
Full Screen
And the confirmation: http://www.petefreitag.com/item/768.cfm
Try running your app on ICS or JB and it should work.
Try to detect version of Android OS on server and to the next:
1) if OS = ICS or above => use native html 5
2) if OS < ICS => show custom html keyboard
Also for OS < ICS in your app disable soft keyboard.
Keyboards are completely pluggable in Android - and therefore somewhat unpredictable. Device manufacturers almost always ship a custom keyboard (which can introduce problems, For example: I've seen some HTC keyboards not handle IME_ACTIONS). Also, users are free to download and use many different keyboards from the Play Store. Certain keyboards may not have an email style - maybe because the developers didn't think of it, or maybe because it's not appropriate. For instance: Something like Graffiti keyboard might legitimately ignore the email style completely?
I believe the best you can do is handle the cases that are supported. If >=ICS supports the input type="email" and older versions don't, at least over time your user base should shift towards a higher percentage of users getting the behavior you want.
I don't know what your app looks like, but another option if you really want the # sign and .com keys to be visible would be to use a hybrid approach where you add only those keys to your html and allow users to tap those or use the normal pluggable Android keyboard for everything else (or # signs and .com's also - if their keyboards include it)

Detect Keyboard IME language on Android

How can I detect which language is use typing into EditText. I know the API 13 has getCurrentInputMethodSubtype, but what is the alternate for older versions?
There is none. And I wouldn't count on even that above working across all keyboards. I wrote a popular keyboard and have no idea where the framework would get that info from- there's no API for them to query what keyboard type we are or for us to update if we switched (say from a user using an in keyboard switch language shortcut).
The keyboard API is really Google's bastard stepchild. They don't seem to put a lot of thought into it, or work with other major keyboard makers when adding new functionality.

Categories

Resources