All Products
Search
Document Center

Cloud Phone:Input method best practices

Last Updated:Jan 21, 2026

Starting with image version 25.07, Cloud Phone supports local input methods, which can provide a better typing experience than the cloud phone built-in input method in some scenarios. This guide applies to the Cloud Phone Matrix Edition.

Input method comparison

A local input method is installed on your local device. This device runs the Alibaba Cloud Workspace client or uses an SDK to display the Cloud Phone screen. You type on your local device, and the text appears in the Cloud Phone instance.

Local input methods and the Cloud Phone built-in input method each have advantages and disadvantages, making them suitable for different use cases. The following table compares them.

Comparison item

Cloud Phone built-in input method

Local input method

Advantages

  • Compatibility: It is compatible with almost any Android input method.

  • Stability: The input method runs on the cloud. If your connection drops unexpectedly due to a weak network, you will not lose the text you are typing.

  • Consistency: You can use your familiar local input method for all tasks. You do not need to switch input source frequently.

  • Responsiveness: Keystrokes, touch processing, input predictions, and word selection all happen on your local device. This prevents lag from network latency or a weak connection.

  • Convenience: In a Windows, iOS, or macOS operating system, you can use the native input method instead of an Android input method.

  • Efficiency: The input method uses your local device's resources. It does not use the computing power of the cloud instance. This is ideal for input methods that require significant computing power, such as AI or speech recognition input methods.

Disadvantages

  • Responsiveness: Due to inherent network latency, transmitting local touch and keyboard inputs to the cloud instance is also subject to a delay. This results in a feeling of sluggishness or input lag for the user. Under poor network conditions, this effect is magnified and can severely degrade the overall input experience.

  • Convenience: If you use a non-Android platform such as Windows, iOS, or macOS, you must use an Android input method. You cannot use the input method you are familiar with.

  • Consistency: The typing experience is not seamless. If you frequently switch between local applications and the cloud phone, you will also have to switch between your local input method and the Cloud Phone built-in input method.

  • Stability: Input is buffered locally and is only sent to the cloud service after a complete entry is made (e.g., after a word is selected from an Input Method Editor). Consequently, an unexpected network interruption can cause the loss of any uncommitted text that is currently being typed.

    Note

    This issue only affects text that is currently being entered. Any content that has already been successfully submitted remains unaffected.

  • Compatibility: In rare cases, for applications that do not use the standard Android input framework, the system may switch back to the Cloud Phone built-in input method.

Methods to switch input source

Use one of the following methods to switch input source. These methods apply to the Cloud Phone Matrix Edition.

ADB

First-time enable

When you first create a Cloud Phone instance, enable the built-in input method.

adb shell settings put secure enabled_input_methods "com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.wuying.wyime/.PseudoImeService"
Switch to the local input method
adb shell ime set com.wuying.wyime/.PseudoImeService
Switch to the Cloud Phone built-in input method

This example involves the pre-installed Gboard input method. Switch to other input methods in a similar way.

adb shell ime set com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME

Web SDK

Note

Get the latest SDK (to use local input methods) and demo. For more information, see Web SDK.

  1. Specify the following parameter when you connect.

    config.useCustomIme=true
  2. Then, follow the regular connection procedure. For more information, see the demo.

Android SDK

To enable the local Input Method Editor (IME) with the Android SDK, you must listen for connection status callbacks from the ASP Engine before the StreamView connects. Once the "connection successful" callback is received, set the local IME to its enabled state within that callback.

Note

Get the latest SDK (to use local input methods) and demo. For more information, see Android SDK.

@Override
public void onCreate() {
    super.onCreate();
    IASPEngineListener listener = new IASPEngineListener() {
        @Override
        public void onConnectionSuccess(int connectionId) {
            mStreamView.getASPEngineDelegate().setImeType(ASPIMEType.ASP_IME_TYPE_LOCAL);
            mStreamView.shouldProactivelyShowIME(true);
        }
    
        /* Note: You also need to implement other interfaces. */
    }
    
    StreamView streamView = findViewById(R.id.stream_view);
    streamView.getASPEngineDelegate().registerASPEngineListener(listener);

    /* Other onCreate procedures */
}

Windows SDK

Windows does not have a unified graphical user interface (GUI) application framework. Therefore, the Windows SDK provides only basic status callbacks and upstream interfaces. You must handle the interaction with the input method during integration.

To use a local input method on Windows, follow these steps:

  1. Implement the AspIme object to accept the onImeFocusUpdate callback.

  2. When you create the AspClient, call setAspIme to register the AspIme object.

  3. When onImeFocusUpdate(true, false) is called, invoke the input method logic for the corresponding UI framework.

  4. When onImeFocusUpdate(false, false) is called, hide the input method for the corresponding UI framework.

  5. When the input method submits characters, call the AspClient::setImeCommit method to submit the input.

Different GUI frameworks use different interfaces to interact with input methods. The following are the interfaces for common frameworks:

  • Qt framework

    • To invoke the input method: setAttribute(Qt::WA_InputMethodEnabled, true);

    • To retrieve input content: Use the void inputMethodEvent(QInputMethodEvent *event) override; callback.

  • WPF framework

    • To invoke the input method: Implement System.Windows.Interop.IKeyboardInputSink.

    • To retrieve input content: Implement public bool TranslateChar(ref MSG msg, ModifierKeys modifiers);.