| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is **true**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is **true**. Otherwise, **err** is an error object.|
**Error codes**
**Error codes**
...
@@ -256,9 +256,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
...
@@ -256,9 +256,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
```js
```js
try{
try{
inputMethod.switchCurrentInputMethodSubtype({
inputMethod.switchCurrentInputMethodSubtype({
id:"com.example.kikakeyboard",
id:"ServiceExtAbility",
label:"ServiceExtAbility",
label:"",
name:"",
name:"com.example.kikakeyboard",
mode:"upper",
mode:"upper",
locale:"",
locale:"",
language:"",
language:"",
...
@@ -295,7 +295,7 @@ Switches to another subtype of the current input method. This API uses a promise
...
@@ -295,7 +295,7 @@ Switches to another subtype of the current input method. This API uses a promise
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
|target | [InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)| Yes| Input method subtype to switch to.|
|target | [InputMethodSubtype](./js-apis-inputmethod-subtype.md)| Yes| Input method subtype to switch to.|
**Return value**
**Return value**
...
@@ -317,9 +317,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
...
@@ -317,9 +317,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
```js
```js
try{
try{
inputMethod.switchCurrentInputMethodSubtype({
inputMethod.switchCurrentInputMethodSubtype({
id:"com.example.kikakeyboard",
id:"ServiceExtAbility",
label:"ServiceExtAbility",
label:"",
name:"",
name:"com.example.kikakeyboard",
mode:"upper",
mode:"upper",
locale:"",
locale:"",
language:"",
language:"",
...
@@ -352,7 +352,7 @@ Obtains the current input method subtype.
...
@@ -352,7 +352,7 @@ Obtains the current input method subtype.
| [InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype) | Current input method subtype.|
| [InputMethodSubtype](./js-apis-inputmethod-subtype.md) | Current input method subtype.|
**Example**
**Example**
...
@@ -375,7 +375,7 @@ Switches to a specified subtype of a specified input method. This API uses an as
...
@@ -375,7 +375,7 @@ Switches to a specified subtype of a specified input method. This API uses an as
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
|inputMethodProperty | [InputMethodProperty](#inputmethodproperty8)| Yes| Input method to switch to.|
|inputMethodProperty | [InputMethodProperty](#inputmethodproperty8)| Yes| Input method to switch to.|
|inputMethodSubtype | [InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)| Yes| Input method subtype to switch to.|
|inputMethodSubtype | [InputMethodSubtype](./js-apis-inputmethod-subtype.md)| Yes| Input method subtype to switch to.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is **true**. Otherwise, **err** is an error object.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result. If the operation is successful, **err** is **undefined** and **data** is **true**. Otherwise, **err** is an error object.|
**Error codes**
**Error codes**
...
@@ -391,25 +391,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
...
@@ -391,25 +391,9 @@ For details about the error codes, see [Input Method Framework Error Codes](../e
| inputMethodProperty | InputMethodProperty| Yes| Input method to which the subtypes belong.|
| inputMethodProperty | InputMethodProperty| Yes| Input method to which the subtypes belong.|
| callback | AsyncCallback<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)>> | Yes| Callback used to return all subtypes of the specified input method.|
| callback | AsyncCallback<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md)>> | Yes| Callback used to return all subtypes of the specified input method.|
**Error codes**
**Error codes**
...
@@ -952,7 +920,7 @@ Obtains all subtypes of a specified input method. This API uses a promise to ret
...
@@ -952,7 +920,7 @@ Obtains all subtypes of a specified input method. This API uses a promise to ret
| Promise<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)>> | Promise used to return all subtypes of the specified input method.|
| Promise<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md)>> | Promise used to return all subtypes of the specified input method.|
**Error codes**
**Error codes**
...
@@ -996,7 +964,7 @@ Obtains all subtypes of this input method. This API uses an asynchronous callbac
...
@@ -996,7 +964,7 @@ Obtains all subtypes of this input method. This API uses an asynchronous callbac
| callback | AsyncCallback<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)>> | Yes | Callback used to return all subtypes of the current input method.|
| callback | AsyncCallback<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md)>> | Yes | Callback used to return all subtypes of the current input method.|
**Error codes**
**Error codes**
...
@@ -1035,7 +1003,7 @@ Obtains all subtypes of this input method. This API uses a promise to return the
...
@@ -1035,7 +1003,7 @@ Obtains all subtypes of this input method. This API uses a promise to return the
| Promise<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md#inputmethodsubtype)>> | Promise used to return all subtypes of the current input method.|
| Promise<Array<[InputMethodSubtype](./js-apis-inputmethod-subtype.md)>> | Promise used to return all subtypes of the current input method.|