Custom Keyboard Development for Android

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Custom Keyboard Development for Android
Complex
~1-2 weeks
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Developing a Custom Keyboard (Input Method Editor) for Android

Input Method Editor (IME) on Android is a service registered in the system via InputMethodService. Unlike iOS, Android gives developers much more freedom: IME can occupy arbitrary height, contain WebView, work in background via bound service. This freedom comes with its own set of pitfalls.

InputMethodService Lifecycle

The keyboard exists as a system service. Key callbacks:

  • onCreateInputView() — create keyboard view, called once
  • onStartInputView(EditorInfo, Boolean) — each time keyboard appears; read EditorInfo.inputType to understand field type—password, email, numbers, arbitrary text
  • onFinishInputView(Boolean) — field lost focus
  • onComputeInsets(Insets) — critical for managing spacing

EditorInfo.inputType is a bit mask. Password field: inputType & InputType.TYPE_MASK_VARIATION == InputType.TYPE_TEXT_VARIATION_PASSWORD. Ignore this and autocorrect suggests in password fields—guaranteed Play Store rejection.

Height and Insets Problem

Most common complaint: keyboard covers EditText. Reason: wrong onComputeInsets implementation. By default, the system doesn't know what screen portion IME occupies and doesn't shift content.

@Override
public void onComputeInsets(InputMethodService.Insets outInsets) {
    super.onComputeInsets(outInsets);
    outInsets.contentTopInsets = outInsets.visibleTopInsets;
}

This only works if host app uses adjustResize or adjustPan in windowSoftInputMode. With adjustNothing nothing helps—it's host responsibility. Document this.

Passing Text to Field

Insert character: getCurrentInputConnection().commitText("a", 1). Delete: getCurrentInputConnection().deleteSurroundingText(1, 0). Composing text (for IMEs with intermediate state like Japanese/Chinese): setComposingText() + finishComposingText().

InputConnection can be null—happens on focus loss between calls. Check every call:

val ic = currentInputConnection ?: return
ic.commitText(text, 1)

Data Storage and Permissions

IME is a privileged component, but permissions work standard. For internet access need INTERNET in manifest. Dictionary and settings—SharedPreferences or Room. Predictive input server-side—only with explicit user consent plus Privacy Policy description.

Play Store checks IMEs with doubled attention: hidden keystroke transmission—direct policy violation. If keyboard sends anything to server (layout analytics, predictive input), declare it via Data Safety Form.

Theme and Material Design

Starting Android 12, keyboard should support Dynamic Color from Material You. MaterialTheme via AppCompatDelegate + DynamicColors.applyToActivitiesIfAvailable() doesn't work in IME directly—apply theme to inputView explicitly via ContextThemeWrapper.

Jetpack Compose inside IME works from Compose 1.2, but needs careful setup: ComposeView inside onCreateInputView() with explicit setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnDetachedFromWindow).

Testing

Test on real devices with different versions: Android 8 (API 26) minimum if not using new IME API. Test in Chrome for Android (separate InputConnection), Gmail, inputType=numberPassword fields. Simulator works but insets behavior differs.

Timeline: 1–3 weeks depending on predictive input, multi-language support, custom theming. Cost calculated individually.