cordova android: remove suggestions - android

I have a cordova app (with ionic2). I'd like to remove the autocomplete/suggestion/autocorrect/... bar on soft keyboard for specific input.
Is it possible ?
I already try with attributes like spellcheck="false" autocomplete="off" autocorrect="off" but it change nothing.
Also after multiple lectures, my problem look comming from the event keycode 229.
But I found nothing to manage the inserted input correctly.
So the idea was to remove this autocomplete bar to avoid these keycode.
When I use a password input type it's working properly. Of course, I saw disc in places of characters. And I need to see characters. For these purpose I tried to remove them with css text-security but of course, it's not working for input type password...
An other solution could probably be accessing the native keyboard or the native input with custom cordova plugin. But I don't know how to access to linked EditText with Cordova.
Any ideas ?
Regards

Related

Is it possible for an app to prevent the keyboard from learning words on Android?

I am developing an Android application (Xamarin Forms) where the user will be entering personal and potentially sensitive information. I would like to prevent the keyboard from "learning" words that the user enters into the application.
I know it is possible for the user to manually delete learned words from their phone (as explained here: https://trendblog.net/delete-learned-words-android-keyboard/ ) but is it possible for an application, or specifically text entries, to tell Android to not learn from entered text?
In Xamarin Forms Entry, try turning off text prediction:
<Entry ... IsTextPredictionEnabled="false" />
I don't know whether that also disables "remembering" what you type. Try it, and leave a comment whether that worked.
If no cross-platform solution is suggested, then you'll need to make a "custom renderer" for Entry, in your .Android project.
There, behavior is controlled by the input type.
Try visible password or maybe no suggestions. (not sure exactly what those are in xamarin, but intellisense will show you the options, at the right place in the custom renderer's code.)

How to stop autocorrect input text for a PWA on mobile browser (Android and iOS)?

On my PWA, for input, native keyboard of the phones are active. Need code for following usecases
1. How to disable autocorrect for PWA for android and iOS?
2. How to build your own keyboard without auto correct for PWA for android and iOS?
Try using following code with you input field inside form element :-
autocorrect="off" autocapitalize="none" autocomplete="off" spellcheck="false"
I think making your own keyboard is not a good idea as it will take much time, if you want to have your own virtual keyboard(i hope for security reasons you are doing this) you can use open souce javascript plugins for the same.

Numeric keyboard as default, but allow text

I'm currently developing an application targeted at android and desktop devices using apache cordova and HTML5.
In order to get the numeric keyboard to pop up I've used input type="number", which works fine.
However, the input field should also accept strings. The current functionality of type=number is that the ui seems to allow for strings to be entered, but the value property of the element is not changed if the input is invalid (e.g not numberic).
Is there a way of getting the numberic keyboard on mobile devices, while still being able to enter text?
My inital tries consisted of capturing the keydown event and manually setting the this.value property. I've tried this using jQuerys .val() and of course the more 'native' approach element.val += char. None of which work. UI is updated, but the change is not reflected in the model.
EDIT
For the next guy trying to achieve this.
1) The HTML solution.
As #LuudJacobs mentions in the comments below; There's currently no way to decide which keyboard is shown except for defining the type-attribute. Though some devices have a button to go back to alphabet keyboard, its not the case for every device. And can not be used reliably.
2) Writing a phonegap/cordova plugin.
It is possible to write a plugin to show and hide the keyboard at will. But, as far as I could find, there is currently no way of programmatically telling it to default to the symbols keyboard. Thus the functionality achieved is similar to using type=number and type=text in the HTML. Another problem with this approach is the diversity of keyboard for android devices, where even users themselves can install their custom keyboard. The functionality of the keyboard can are therefore unknown. What works on one device, may not work on the next.
3) JS/HTML/Canvas solution
Finally... A feasible solution. I suggest taking a look at this walkthrough as it shows an easy way to creating the keyboard using just html and js. Another option would be to use a canvas, and draw the keyboard yourself, but I would imagine that this is more error prone and harder to do.
As explained in the HTML5 spec you can not have anything but valid floats in a input type="number". So You can not. On a sidenote: how would users enter text when they'd only have a numeric keyboard?

Phonegap Android force numeric keyboard on input

I'm using
-webkit-user-modify: read-write-plaintext-only;
on my input fields in my app to prevent several behavior with android ICS but i would like to force the numeric keyboard to show up on specific inputs. And i want to keep the CSS line.
Is there a way to do it ? by modifying some classes in the .java files ? Or maybe is there another way ?
Thanks
On HTML5 (as you're talking on Java mods, I wrote this to be clear):
The only way to trigger the numeric keyboard on Android devices is to use <input type="number"> or <input type="tel">. That comes with some small problems, especially if you're dealing with Angular or with HTML5 native validation, but for the general use this should be no problem.

Changing the Keyboard for Specific App on Android

I am developing a "Nepali Dictionary Android App" using Cordova. Using jQuery I have been able to map the keyboard character to Devnagari. For example If you pressed the 'k' from keyboard 'क' will be displayed in editable text inputs. Now , I am trying to change the keyboard characters so that the users could see Nepali characters in keyboard.
I don't know If it is possible or not, but I think it should be. I am not a java programmer and using cordova api to build the android applications. I am also planning to create MultiKeyboard Phonegap / Cordova Plugin for android (in future ) if It is possible.
My Question is :
How can I change the android keyboard characters for some specific apps ?
WHAT HAVE I TRIED
I have not started coding for this because I don't know if it is possible or not. Please show me the right way.
Thanks.
You could change char value with different value if the given input values will not be used. What i mean is if 'k' will never be used you could catch that input in for example
var tempChar;
variable and swap it's value from a HashMap, but I don't know if you can change the layout of keyboard using PhoneGap only. If you can't do, you can draw your own keyboard using jQuery Mobile if there is way to disable Android keyboard for your app.

Categories

Resources