Click or drag to resize

PropertyID.VirtualKeyboardsCustomEnabled Field

Administrative Settings: For devices managed by an organization, administrative policies might require to enable or disable the custom virtual keyboards which could be installed in addition to the ones provided by default.

Namespace: Com.Datalogic.Device.Configuration
Assembly: datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
public const Int32 VirtualKeyboardsCustomEnabled = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
 List installedIMEs

Field Value

Type: Int32
Remarks
Administrative Settings: For devices managed by an organization, administrative policies might require to enable or disable the custom virtual keyboards which could be installed in addition to the ones provided by default.

This parameter is a list containing the input method editor IDs related to the custom virtual keyboards to be enabled. It allows to enable one or multiple custom virtual keyboards by adding them to the list, or to disable them by removing from the list.

It is not required that the custom virtual keyboards added to the list have been already installed on the device. In that case, if a custom virtual keyboard is added to this list, but it has not been installed yet, the configuration is accepted. When that custom virtual keyboard will be installed later, it will be enabled or disabled accordingly to its presence into this list.

Coherently, when a custom virtual keyboard will be uninstalled, this property will not change. That ID is kept in the list, in order to restore the required configuration when that custom virtual keyboard will be installed again in the future.

This property is intended for creating a configuration of custom virtual keyboards. In order to enabled or disable the virtual keyboards provided by default, the following properties shall be used instead:

The class of the property is BlobProperty. The specific implementation for this type of blob is StringSetBlob.

Input method editor ID: Android defines a input method editor ID as a string in the form "package_name/class_name", composed by the package name of the virtual keyboard application and the class name of the main input method service within the keyboard application. For a comprehensive definition of the structure of virtual keyboard ID and some examples, refers to the details provided in the description of VIRTUAL_KEYBOARD_PROFILE.

Custom virtual keyboards are usually distributed as APKs. In that case, the custom virtual keyboard can be installed on or uninstalled from the device as any other App.

The link to the InputMethodManager at the Google's documentation can be helpful to correctly interact with the Input Methods and to retrieve the details related to the Input Methods.

The list of virtual keyboards currently installed on the device can be retrieved as shown by the example below:

 InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
 List installedIMEs = inputMethodManager.getInputMethodList();
 
In alternative, the following command retrieves the list of input method editor IDs currently installed on the device:
adb shell ime list -a -s

The list of virtual keyboards currently enabled on the device can be retrieved as shown by the example below:

 InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
 List enabledIMEs = inputMethodManager.getEnabledInputMethodList();
 
In alternative, the following command retrieves the list of input method IDs currently enabled on the device:
adb shell ime list -s
In order to enable or disable desired virtual keyboards, the following commands provide an alternative to VIRTUAL_KEYBOARD_GBOARD_ENABLED, VIRTUAL_KEYBOARD_VOICE_TYPING_ENABLED, VIRTUAL_KEYBOARD_ANDROID_ENABLED, VIRTUAL_KEYBOARDS_CUSTOM_ENABLED:
adb shell ime enable [input method id]
or
adb shell ime disable [input method id]

But, as mention above, the property VIRTUAL_KEYBOARDS_CUSTOM_ENABLED can be used also to enable virtual keyboards not yet installed on the device, while the Android methods allow to enable virtual keyboard which are already installed on the device.

Finally, in order to select the virtual keyboard which should be displayed to the user, refer to property VIRTUAL_KEYBOARD_PROFILE.

[Android Documentation]

See Also