From 011bd6962c6d050e95f89fb48facb794fa88c1df Mon Sep 17 00:00:00 2001 From: sreevanis Date: Wed, 11 May 2016 11:30:58 -0700 Subject: [PATCH] Wear 2.0 preview input method documentaation. Bug:28472831 Change-Id: Ic2143ec8087d084609e3c6e8c125c37e1a5849da --- docs/html/wear/preview/features/ime.jd | 131 ++++++++++++++++++++++++- 1 file changed, 130 insertions(+), 1 deletion(-) diff --git a/docs/html/wear/preview/features/ime.jd b/docs/html/wear/preview/features/ime.jd index dc4adf1771b25..4ee507c3c8fda 100644 --- a/docs/html/wear/preview/features/ime.jd +++ b/docs/html/wear/preview/features/ime.jd @@ -4,4 +4,133 @@ page.tags="wear" @jd:body -

stub

\ No newline at end of file + +
+ +
+ + +

Wear 2.0 supports input methods beyond voice by extending the Android +Input Method Framework (IMF) to Android Wear. IMF allows for virtual, on-screen + keyboards and other input methods to be used for text entry. The IMF APIs used + for Wear devices are the same as other form factors, though usage is slightly + different due to limited screen real estate.

+ +

Wear 2.0 comes with the system default Input Method Editor (IME) +and opens up the IMF APIs for third-party developers to create custom input +methods for Wear. +

+ + +

Creating an Input Method for Wear

+ +

To create an input method for Wear, +see Creating an Input Method. +

+ +

Invoking IME

+If you are developing an IME for Wear, remember that the +feature is supported only on Android 6.0 (API level 23) and higher versions of +the platform. +To ensure that your IME can only be installed on Wearables that support input +methods beyond voice, add the following to your application's manifest: +
+<uses-sdk android:minSdkVersion="23" />
+
+This indicates that your application requires Android 6.0 or higher. +For more information, see API Levels + and the documentation for the <uses-sdk> +element. +

+To control how your application is filtered from devices that do not support Wear +IMEs (for example, on Phone), add the following to your application's manifest: +

+
+<uses-feature android:required="true" android:name="android.hardware.type.watch" />
+
+ +

Wear provides user settings on the watch that lets the user to enable multiple + IMEs from the list of installed IMEs. Once the users enable your IME, they + can invoke your IME from:

+ + + +

General IME Considerations

+ +

Here are some things to consider when implementing IME for wear:

+ + + + +

Test your IME

+ +

To test your IME, install the +Input Box + app which has a simple EditText field. + When responding to messages from chat apps, you can also use the IME on the + watch.

+ + +