All Products
Search
Document Center

Cloud Phone:Input method best practices

Last Updated:Oct 21, 2025

Starting with image version 25.07, Cloud Phone supports local input methods, which can provide a better typing experience than the built-in input method in some scenarios.

Input method comparison

A local input method is installed on your local device. This device runs the Cloud Phone 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 built-in Cloud Phone input method each have advantages and disadvantages, making them suitable for different scenarios. The following table compares them.

Comparison item

Built-in Cloud Phone 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 methods frequently.

  • Smoothness: 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: On non-Android platforms such as Windows, iOS, and macOS, you can use the native input method for that platform. You do not have to use 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

  • Smoothness: Network latency causes a delay in passing through touch and keyboard inputs. This results in a noticeable lag. In weak network environments, this lag can seriously degrade the typing 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 built-in Cloud Phone input method.

  • Stability: Text is not sent to the cloud until you finish an entry, such as by selecting a word. An unexpected network disconnection can cause you to lose the text you are currently typing.

    Note

    This does not affect text that is already entered. It only affects the text you are actively composing.

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

Methods to switch input methods

You can switch input methods as needed.

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 built-in Cloud Phone input method

This example uses the pre-installed Gboard input method. 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

Obtain the latest SDK and demo to use local input methods. 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 more information, see the demo.

Android SDK

To enable the local input method with the Android SDK, listen for the connection status callback from the ASP Engine before StreamView connects. Then, enable the local input method in the successful connection callback.

Note

Obtain the latest SDK and demo to use local input methods. 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 a character, 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);.