Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop a soft keyboard for Android? [closed]

I would like to play around with some ideas and develop a soft keyboard for Android to replace the default one.

  • Is there any general information about soft keyboard development for Android out there? Any best practices or guidelines?

  • Can I do with my keyboard application pretty much anything I could do with a normal Android application?

  • Can I do HTTP connections to synchronize keyboard data with a cloud DB and other phones I have?

  • Can I open other windows/screens from a key press, e.g. to display a custom input interface different to a normal QWERTY one. If that doesn't work, can I use a pop-up dialog instead?

like image 421
znq Avatar asked Aug 13 '10 21:08

znq


People also ask

How do I make the keyboard softer on my Android?

By default, the soft keyboard may not appear on the emulator. If you want to test with the soft keyboard, be sure to open up the Android Virtual Device Manager ( Tools => Android => AVD Manager ) and uncheck "Enable Keyboard Input" for your emulator.

What is soft keyboard in Android?

The soft keyboard (also called the onscreen keyboard) is the main input method on Android devices, and almost every Android developer needs to work with this component at some point.

How do I know if my Android keyboard is soft?

Android provides no direct way to determine if the keyboard is open, so we have to get a little creative. The View class has a handy method called getWindowVisibleDisplayFrame from which we can retrieve a rectangle which contains the portion of the view visible to the user.


1 Answers

Some tips:

  • Read this tutorial: Creating an Input Method
  • clone this repo: LatinIME

About your questions:

An inputMethod is basically an Android Service, so yes, you can do HTTP and all the stuff you can do in a Service.

You can open Activities and dialogs from the InputMethod. Once again, it's just a Service.

I've been developing an IME, so ask again if you run into an issue.

like image 159
Macarse Avatar answered Sep 23 '22 06:09

Macarse