All Products
Search
Document Center

Cloud Phone:Input method best practices

Last Updated:Jun 22, 2026

Starting with Cloud Phone image version 25.07, Cloud Phone supports using your local input method. In some scenarios, this provides a better typing experience than the Cloud Phone built-in input method. This guide applies to the Cloud Phone Matrix Edition.

Input method comparison

A local input method is one installed on the local device that runs the Alibaba Cloud Workspace client or uses an SDK to access the Cloud Phone screen. You type on your local device, and the input is processed and displayed in the Cloud Phone instance.

The following table compares local input methods with the Cloud Phone built-in input method.

Comparison item

Cloud Phone built-in input method

Local input method

Advantages

  • Compatibility: Highly compatible with almost any Android input method.

  • Stability: The input method runs in the cloud. Even if the connection drops due to a weak network, the content you are typing is not lost.

  • Consistency: You can use your familiar local input method for all tasks without frequently switching.

  • Responsiveness: Keystrokes, touch processing, predictive input, recommendations, and candidate word selection all happen on your local device. This prevents lag caused by network latency or a weak network.

  • Convenience: On non-Android platforms like Windows, iOS, or macOS, you can use the platform's native input method instead of an Android-specific one.

  • Efficiency: The input method uses computing power from your local device, not from the cloud. This is ideal for modern input methods that require significant computing power, such as those for AI or speech recognition.

Disadvantages

  • Responsiveness: Network latency delays the transmission of touch and keyboard input, causing noticeable lag. In a weak network, this lag can severely degrade the typing experience.

  • Convenience: Users on non-Android platforms like Windows, iOS, or macOS are forced to use an Android input method and cannot use their familiar one.

  • Consistency: If you frequently switch between local applications and the Cloud Phone, you must also switch between the local and Cloud Phone built-in input methods each time.

  • Stability: Until you complete an input (typically by selecting a candidate word), local content is not submitted to the cloud. An unexpected network interruption can cause you to lose text that you are composing.

    Note

    Completed text is not affected. This only affects the text you are currently composing.

  • Compatibility: In rare cases where an application does not use the standard Android input framework, the system may fall back to the Cloud Phone built-in input method.

Input method switching

You can switch between input methods as needed. The following methods apply to the Cloud Phone Matrix Edition.

ADB

Initial setup

When you first create a Cloud Phone instance, enable the Cloud Phone 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 local input method
adb shell ime set com.wuying.wyime/.PseudoImeService
Switch to built-in input method

This example uses the pre-installed Gboard input method on the Cloud Phone. You can replace it with another input method.

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

Web SDK

Note

Get the latest SDK (to support 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 standard connection procedure. For details, refer to the demo.

Android SDK

To enable the local input method in the Android SDK, register a connection status listener on the ASP Engine before the StreamView connects, and then enable the local input method in the successful connection callback.

Note

Get the latest SDK (to support 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 must also implement other interfaces. */
    }
    StreamView streamView = findViewById(R.id.stream_view);
    streamView.getASPEngineDelegate().registerASPEngineListener(listener);
    /* Other onCreate procedures */
}

Windows SDK

Because Windows lacks a unified GUI application framework, the Windows SDK provides only basic status callbacks and upstream interfaces. You must implement the input method interaction logic yourself.

Using a local input method on Windows involves the following steps:

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

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

  3. When onImeFocusUpdate(true, false) is called, activate the input method 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 commits characters, call the AspClient::setImeCommit method to submit the input.

Each GUI framework uses its own interface to interact with input methods. The following are common examples:

  • Qt framework

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

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

  • WPF framework

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

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