Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0Version 14.0Version 13.0Version 12.0Version 11.0Version 10.0Version 2.0

Index

On this page

You are viewing an old version of this documentation. Click here to open the current version, 17.0.

KMManager.initialize()

Summary

The initialize() method initializes the Keyman manager.

Syntax

KMManager.initialize(Context context, KeyboardType keyboardType)

Parameters

context
The context that starts the initialization. This is normally an Activity or the application context of an InputMethodService.
keyboardType
KeyboardType to be used. KEYBOARD_TYPE_INAPP or KEYBOARD_TYPE_SYSTEM.

Description

This method is normally called from onCreate() method of an Activity or InputMethodService.

Examples

Example: Using initialize()

The following script illustrate the use of initialize():

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // ...
    KMManager.initialize(this, KeyboardType.KEYBOARD_TYPE_INAPP);
    // ...
    // do not call setContentView before initializing the Keyman manager.
    setContentView(R.layout.activity_main);
    // ...
}