I'm looking for references to do a keyboard app like Gboard.
I checked GitHub and googled for custom keyboard for android code and I still don't know what to do.
I came across AnySoftKeyboard but it seems complicated and I think it's not what I'm looking for.
I don't need the keyboard to be that customised, I want to have a search functionality when a user clicked on a key from the keyboard, it will show an input field where the user can type any text and automatically search on the internet about the typedText and display the searches then user can share it as part of the text he/she will send to the recipient.
Creating an Input Method Editor from the Android Docs
Related
I'm working on an Android app that needs to take input in Arabic whenever the User taps on an EditText view. So how do I change the keyboard language programatically or ask the User to do so?
I conducted extensive research and found out that it can be done via:
a) creating a custom Arabic keyboard,
b) using the IME manager to prompt the user to change input method by calling showInputMethodPicker(),
c) using the IME manager to change input method by calling setInputMethod.
of these, (c) is only workable for System apps, and (a) requires a lot of time (which I currently don't have), and (b) requires the user to manually enable it.
Is there absolutely ANY simple and workable way to accomplish this? Any external API that I could use or anything at all?
https://www.codeproject.com/Questions/996415/ceate-custom-arabic-keyboard-for-android
Above link can help you.For getting above required feature you need to make custom keyboard Arabic then open that keyboard when you type in edit 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?
Is there a way to load an app specific custom dictionary for android keyboard auto-complete to show to the users? My app uses a few hundred words only and any input other than these words is going to be useless.
I want to just load the word list used in my app and override the default android (or swype/swiftkey dictionaries if they are installed), without the hassle of implementing a full blown keyboard.
I have seen a couple of similar questions like here, but nothing that answers my question. Android IME again requires you to write a keyboard.
I think that make SQLite database in your application in your android application and load this data in the autocomplete and when the user entered the text then check that whether the word he entered lies in that database or not. If yes, then keep this in that textbox otherwise make text of that textbox empty i.e "". Hope that this will work for you....
I'm an Android developer and I'm trying to figure out how to build a tool/app that suggests features to the user when highlighting any text on any other application.
Is that possible? I guess it will be similar to developing the "copy and paste" feature, but I just need to know from where to begin and what do I exactly need to achieve this.
EDITED:
Can I use "The Clipboard Framework" to listen for text selection?
Is that possible?
Generally speaking, no, for security reasons.
In this specific case, you could create your own input method editor (a.k.a., soft keyboard), which the user could elect to use, and you could find out when the user selects text in an EditText. But writing a good input method editor is not simple, and it will have no effect on, say, text highlighted in a Web browser.
Can I use "The Clipboard Framework" to listen for text selection?
No.
Mmmmmh, you must do all tutorials and read theory before you start programming anything.
If you don't want to do that, you could start doing things that are already done in tutorials and manuals.
By the way, try to do THIS tutorial, to learn the basics about save content and manipulating text. Then, this summary about writing text. And then, you can start thinking about aplications.
I wish to create my own custom keyboard on android. It seems the below project on google code project should be able to achieve this. But to extension to this what I also want to add is ability to handle browser events when user is using custom keyboard. ie if user clicks on browser address bar or any text box on the page opened I should be able to determine that as well? Is there a way possible?
http://code.google.com/p/android-misc-widgets/source/checkout
Thanks,
nil
I'm not sure what your question is, but I think you are asking how to create a keyboard that is used when the user clicks on textfields in other apps. Is that right?
If you want to create your own virtual keyboard then you should definitely start by reading the Android IME Docs they are really good and even provide code for a example keyboard that you can download.