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. +
+ + +To create an input method for Wear, +see Creating an Input Method. +
+ ++<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:
+Here are some things to consider when implementing IME for wear:
+ ++{@code RemoteInput} +and Wear apps expect only single-line text entry. The ENTER key should always trigger + a call to sendDefaultEditorAction, + which causes the app to dismiss the keyboard and continue on to the next step + or action.
++Most on-screen input methods will consume most of the screen, leaving very little + of the app visible; hence, we discourage Android Wear apps from presenting a + visible {@code EditTextView}. Instead, a full-screen IME uses + ExtractEditText + to render its own view of the attached editor, also providing control over the + styling of this view. You can ignore all editor-related events that the IME + doesn't generate. +For more details on full-screen mode, see +InputMethodService. +
++For privacy reasons, at a minimum you should handle the {@code inputType} +flag {@code TYPE_TEXT_VARIATION_PASSWORD} in your IME. When your IME is in +password mode, make sure that your keyboard is optimized for single key press +(auto spelling correction, auto completion and gesture input are disabled). +Most importantly, keyboard in password mode should support ASCII symbols +regardless of the input language. For more details, see +Specifying The Input Method Type. +
++Android allows users to easily switch between all IMEs supported by the platform. + In your IME implementation, set the boolean + supportsSwitchingToNextInputMethod = true + to enable your IME to support switching mechanism + (so that apps can switch to the next platform-supported 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.