Skip to content

Commit 7cd24e4

Browse files
committed
auto: Keyman for android help deployment
1 parent b162020 commit 7cd24e4

File tree

8 files changed

+154
-1
lines changed

8 files changed

+154
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Keyman for Android APIs
3+
---
4+
5+
## Summary
6+
7+
The **`Keyman for Android`** app has the following APIs for integration:
8+
9+
10+
## Description
11+
12+
The Keyman for Android app installs as an Input Method Extension. When selected as the active system keyboard, it provides the following APIs:
13+
14+
15+
## Intents
16+
17+
When the Keyman system keyboard changes the associated font name, the following Intent is broadcast so the integrating application can match the font:
18+
19+
```java
20+
intent = new Intent("com.tavultesoft.kmapro.keyboard_changed");
21+
intent.putExtra("fontName", fontName);
22+
sendBroadcast(intent);
23+
```

developer/engine/android/19.0/KMManager/applyKeyboardHeight.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ KMManager.applyKeyboardHeight(Context context, int height, int orientation)
2323
: The context
2424

2525
`height`
26-
: The height of the keyboard frame in *density-independent pixels (dp)*. Pass `KMManager.KeyboardHeight_Reset` to reset the keyboard height (for current orientation) to device-specific defaults.
26+
: The height of the keyboard frame in *density-independent pixels (dp)*. Pass `KMManager.KeyboardHeight_Reset` to reset the keyboard height (for the current orientation) to device-specific defaults.
2727

2828
`orientation` _(Optional)_
2929
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to change the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, keyboard height is set for the current device orientation.
@@ -78,3 +78,5 @@ The following script illustrates the use of `applyKeyboardHeight()` to reset key
7878

7979
## See also
8080
* [getKeyboardHeight()](getKeyboardHeight)
81+
* [getKeyboardHeightMax()](getKeyboardHeightMax)
82+
* [getKeyboardHeightMin()](getKeyboardHeightMin)

developer/engine/android/19.0/KMManager/getKeyboardHeight.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ or
5555
## See also
5656

5757
- [applyKeyboardHeight()](applyKeyboardHeight)
58+
- [getKeyboardHeightMax](getKeyboardHeightMax)
59+
- [getKeyboardHeightMin](getKeyboardHeightMin)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: KMManager.getKeyboardHeightMax()
3+
---
4+
5+
## Summary
6+
7+
The **`getKeyboardHeightMax()`** method returns the maximum allowed height of the keyboard frame for this context.
8+
9+
## Syntax
10+
11+
``` javascript
12+
KMManager.getKeyboardHeightMax(Context context)
13+
```
14+
or
15+
``` javascript
16+
KMManager.getKeyboardHeightMax(Context context, int orientation)
17+
```
18+
19+
### Parameters
20+
21+
`context`
22+
: The context.
23+
24+
`orientation` _(Optional)_
25+
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to get the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, maximum keyboard height is returned for the current device orientation.
26+
27+
### Returns
28+
29+
Returns the maximum allowed height of the keyboard frame in *density-independent pixels
30+
(dp)*.
31+
32+
## Description
33+
34+
Use this method to get the maximum allowed height of the keyboard frame.
35+
36+
## Examples
37+
38+
### Example: Using `getKeyboardHeightMax()`
39+
40+
The following script illustrate the use of `getKeyboardHeightMax()`:
41+
42+
``` javascript
43+
int maxKeyboardHeight = KMManager.getKeyboardHeightMax(this);
44+
```
45+
or
46+
```java
47+
import android.content.res.Configuration;
48+
...
49+
// Get the maximum allowed Keyman keyboard height for landscape mode.
50+
int maxKeyboardHeightLandscape = KMManager.getKeyboardHeightMax(this, Configuration.ORIENTATION_LANDSCAPE);
51+
```
52+
53+
## See also
54+
55+
- [applyKeyboardHeight()](applyKeyboardHeight)
56+
- [getKeyboardHeight()](getKeyboardHeight)
57+
- [getKeyboardHeightMin()](getKeyboardHeightMin)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: KMManager.getKeyboardHeightMin()
3+
---
4+
5+
## Summary
6+
7+
The **`getKeyboardHeightMin()`** method returns the minimum allowed height of the keyboard frame for this context.
8+
9+
## Syntax
10+
11+
``` javascript
12+
KMManager.getKeyboardHeightMin(Context context)
13+
```
14+
or
15+
``` javascript
16+
KMManager.getKeyboardHeightMin(Context context, int orientation)
17+
```
18+
19+
### Parameters
20+
21+
`context`
22+
: The context.
23+
24+
`orientation` _(Optional)_
25+
: Accepts a [screen orientation](https://developer.android.com/training/multiscreen/screensizes#TaskUseOriQuali) value. This is most useful if you want to get the size of the keyboard in the other (non-current) orientation. If `orientation` is not defined, minimum keyboard height is returned for the current device orientation.
26+
27+
### Returns
28+
29+
Returns the minimum allowed height of the keyboard frame in *density-independent pixels
30+
(dp)*.
31+
32+
## Description
33+
34+
Use this method to get the minimum allowed height of the keyboard frame.
35+
36+
## Examples
37+
38+
### Example: Using `getKeyboardHeightMin()`
39+
40+
The following script illustrate the use of `getKeyboardHeightMin()`:
41+
42+
``` javascript
43+
int minKeyboardHeight = KMManager.getKeyboardHeightMin(this);
44+
```
45+
or
46+
```java
47+
import android.content.res.Configuration;
48+
...
49+
// Get the minimum allowed Keyman keyboard height for landscape mode.
50+
int minKeyboardHeightLandscape = KMManager.getKeyboardHeightMin(this, Configuration.ORIENTATION_LANDSCAPE);
51+
```
52+
53+
## See also
54+
55+
- [applyKeyboardHeight()](applyKeyboardHeight)
56+
- [getKeyboardHeight()](getKeyboardHeight)
57+
- [getKeyboardHeightMax()](getKeyboardHeightMax)

developer/engine/android/19.0/KMManager/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ The KMManager is the core class which provides most of the methods and constants
101101
[`getKeyboardHeight()`](getKeyboardHeight)
102102
: returns the height of the keyboard frame
103103

104+
[`getKeyboardHeightMax()`](getKeyboardHeightMax)
105+
: returns the maximum allowed height of the keyboard frame
106+
107+
[`getKeyboardHeightMin()`](getKeyboardHeightMin)
108+
: returns the minimum allowed height of the keyboard frame
109+
104110
[`getKeyboardIndex()`](getKeyboardIndex)
105111
: returns index number of the specified keyboard in keyboards list
106112

developer/engine/android/19.0/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ see [What's New](whatsnew) for breaking changes</a>
2727
[KeyboardEventHandler](KeyboardEventHandler/)
2828
: Provides keyboard and lexical-model events and methods to notify registered listeners
2929

30+
[Keyman for Android app](KMAPro/)
31+
: Public APIs for integrating with the Keyman application
32+
3033
## See also
3134

35+
* [Keyman Engine for Android 18.0](/developer/engine/android/18.0/)
3236
* [Keyman Engine for Android 17.0](/developer/engine/android/17.0/)
3337
* [Keyman Engine for Android 16.0](/developer/engine/android/16.0/)
3438
* [Keyman Engine for Android 15.0](/developer/engine/android/15.0/)

developer/engine/android/19.0/whatsnew.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
title: What's New in Keyman Engine 19.0 for Android
33
---
44

5+
* Added API for broadcasting when Keyman system keyboard font changes (#15193)
6+
57
## See Also
68
* [Keyman Engine for Android Documentation](index)

0 commit comments

Comments
 (0)