@capgo/capacitor-home-indicator 7.1.16 → 7.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -4
- package/android/src/main/java/ee/forgr/home_indicator/HomeIndicatorPlugin.java +2 -2
- package/dist/docs.json +51 -11
- package/dist/esm/definitions.d.ts +54 -9
- package/dist/esm/definitions.js.map +1 -1
- package/ios/Sources/CapgoHomeIndicatorPlugin/CapgoHomeIndicatorPlugin.swift +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,13 +84,22 @@ npx cap sync
|
|
|
84
84
|
<docgen-api>
|
|
85
85
|
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
86
86
|
|
|
87
|
+
Capacitor Home Indicator Plugin for controlling the iOS home indicator visibility.
|
|
88
|
+
The home indicator is the horizontal bar at the bottom of iOS devices without a physical home button.
|
|
89
|
+
|
|
87
90
|
### hide()
|
|
88
91
|
|
|
89
92
|
```typescript
|
|
90
93
|
hide() => Promise<void>
|
|
91
94
|
```
|
|
92
95
|
|
|
93
|
-
Hide the home indicator.
|
|
96
|
+
Hide the home indicator at the bottom of the screen.
|
|
97
|
+
|
|
98
|
+
This visually hides the iOS home indicator bar, providing a more immersive
|
|
99
|
+
full-screen experience. Users can still swipe up to access home, but the
|
|
100
|
+
indicator will not be visible until they start the gesture.
|
|
101
|
+
|
|
102
|
+
iOS only. Has no effect on Android or web.
|
|
94
103
|
|
|
95
104
|
**Since:** 0.0.1
|
|
96
105
|
|
|
@@ -103,7 +112,12 @@ Hide the home indicator.
|
|
|
103
112
|
show() => Promise<void>
|
|
104
113
|
```
|
|
105
114
|
|
|
106
|
-
Show the home indicator.
|
|
115
|
+
Show the home indicator at the bottom of the screen.
|
|
116
|
+
|
|
117
|
+
This restores the default iOS home indicator visibility, making it
|
|
118
|
+
always visible to the user. This is the default behavior.
|
|
119
|
+
|
|
120
|
+
iOS only. Has no effect on Android or web.
|
|
107
121
|
|
|
108
122
|
**Since:** 0.0.1
|
|
109
123
|
|
|
@@ -116,7 +130,9 @@ Show the home indicator.
|
|
|
116
130
|
isHidden() => Promise<{ hidden: boolean; }>
|
|
117
131
|
```
|
|
118
132
|
|
|
119
|
-
|
|
133
|
+
Check whether the home indicator is currently hidden.
|
|
134
|
+
|
|
135
|
+
Returns the current visibility state of the iOS home indicator.
|
|
120
136
|
|
|
121
137
|
**Returns:** <code>Promise<{ hidden: boolean; }></code>
|
|
122
138
|
|
|
@@ -131,10 +147,12 @@ Get the home indicator status.
|
|
|
131
147
|
getPluginVersion() => Promise<{ version: string; }>
|
|
132
148
|
```
|
|
133
149
|
|
|
134
|
-
Get the native Capacitor plugin version
|
|
150
|
+
Get the native Capacitor plugin version.
|
|
135
151
|
|
|
136
152
|
**Returns:** <code>Promise<{ version: string; }></code>
|
|
137
153
|
|
|
154
|
+
**Since:** 0.0.1
|
|
155
|
+
|
|
138
156
|
--------------------
|
|
139
157
|
|
|
140
158
|
</docgen-api>
|
|
@@ -16,7 +16,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
16
16
|
@CapacitorPlugin(name = "HomeIndicator")
|
|
17
17
|
public class HomeIndicatorPlugin extends Plugin {
|
|
18
18
|
|
|
19
|
-
public final String
|
|
19
|
+
public final String pluginVersion = "7.1.15";
|
|
20
20
|
private OrientationEventListener orientationEventListener;
|
|
21
21
|
private int previousOrientation = Configuration.ORIENTATION_UNDEFINED;
|
|
22
22
|
|
|
@@ -72,7 +72,7 @@ public class HomeIndicatorPlugin extends Plugin {
|
|
|
72
72
|
public void getPluginVersion(final PluginCall call) {
|
|
73
73
|
try {
|
|
74
74
|
final JSObject ret = new JSObject();
|
|
75
|
-
ret.put("version", this.
|
|
75
|
+
ret.put("version", this.pluginVersion);
|
|
76
76
|
call.resolve(ret);
|
|
77
77
|
} catch (final Exception e) {
|
|
78
78
|
call.reject("Could not get plugin version", e);
|
package/dist/docs.json
CHANGED
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
"api": {
|
|
3
3
|
"name": "HomeIndicatorPlugin",
|
|
4
4
|
"slug": "homeindicatorplugin",
|
|
5
|
-
"docs": "",
|
|
6
|
-
"tags": [
|
|
5
|
+
"docs": "Capacitor Home Indicator Plugin for controlling the iOS home indicator visibility.\nThe home indicator is the horizontal bar at the bottom of iOS devices without a physical home button.",
|
|
6
|
+
"tags": [
|
|
7
|
+
{
|
|
8
|
+
"text": "0.0.1",
|
|
9
|
+
"name": "since"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
7
12
|
"methods": [
|
|
8
13
|
{
|
|
9
14
|
"name": "hide",
|
|
@@ -11,15 +16,24 @@
|
|
|
11
16
|
"parameters": [],
|
|
12
17
|
"returns": "Promise<void>",
|
|
13
18
|
"tags": [
|
|
19
|
+
{
|
|
20
|
+
"name": "returns",
|
|
21
|
+
"text": "Promise that resolves when the home indicator is hidden"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "throws",
|
|
25
|
+
"text": "Error if hiding the indicator fails"
|
|
26
|
+
},
|
|
14
27
|
{
|
|
15
28
|
"name": "since",
|
|
16
29
|
"text": "0.0.1"
|
|
17
30
|
},
|
|
18
31
|
{
|
|
19
|
-
"name": "
|
|
32
|
+
"name": "example",
|
|
33
|
+
"text": "```typescript\nawait HomeIndicator.hide();\n```"
|
|
20
34
|
}
|
|
21
35
|
],
|
|
22
|
-
"docs": "Hide the home indicator.",
|
|
36
|
+
"docs": "Hide the home indicator at the bottom of the screen.\n\nThis visually hides the iOS home indicator bar, providing a more immersive\nfull-screen experience. Users can still swipe up to access home, but the\nindicator will not be visible until they start the gesture.\n\niOS only. Has no effect on Android or web.",
|
|
23
37
|
"complexTypes": [],
|
|
24
38
|
"slug": "hide"
|
|
25
39
|
},
|
|
@@ -29,15 +43,24 @@
|
|
|
29
43
|
"parameters": [],
|
|
30
44
|
"returns": "Promise<void>",
|
|
31
45
|
"tags": [
|
|
46
|
+
{
|
|
47
|
+
"name": "returns",
|
|
48
|
+
"text": "Promise that resolves when the home indicator is shown"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "throws",
|
|
52
|
+
"text": "Error if showing the indicator fails"
|
|
53
|
+
},
|
|
32
54
|
{
|
|
33
55
|
"name": "since",
|
|
34
56
|
"text": "0.0.1"
|
|
35
57
|
},
|
|
36
58
|
{
|
|
37
|
-
"name": "
|
|
59
|
+
"name": "example",
|
|
60
|
+
"text": "```typescript\nawait HomeIndicator.show();\n```"
|
|
38
61
|
}
|
|
39
62
|
],
|
|
40
|
-
"docs": "Show the home indicator.",
|
|
63
|
+
"docs": "Show the home indicator at the bottom of the screen.\n\nThis restores the default iOS home indicator visibility, making it\nalways visible to the user. This is the default behavior.\n\niOS only. Has no effect on Android or web.",
|
|
41
64
|
"complexTypes": [],
|
|
42
65
|
"slug": "show"
|
|
43
66
|
},
|
|
@@ -47,15 +70,24 @@
|
|
|
47
70
|
"parameters": [],
|
|
48
71
|
"returns": "Promise<{ hidden: boolean; }>",
|
|
49
72
|
"tags": [
|
|
73
|
+
{
|
|
74
|
+
"name": "returns",
|
|
75
|
+
"text": "Promise that resolves with an object containing the hidden status"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "throws",
|
|
79
|
+
"text": "Error if checking the status fails"
|
|
80
|
+
},
|
|
50
81
|
{
|
|
51
82
|
"name": "since",
|
|
52
83
|
"text": "0.0.1"
|
|
53
84
|
},
|
|
54
85
|
{
|
|
55
|
-
"name": "
|
|
86
|
+
"name": "example",
|
|
87
|
+
"text": "```typescript\nconst { hidden } = await HomeIndicator.isHidden();\nif (hidden) {\n console.log('Home indicator is hidden');\n} else {\n console.log('Home indicator is visible');\n}\n```"
|
|
56
88
|
}
|
|
57
89
|
],
|
|
58
|
-
"docs": "
|
|
90
|
+
"docs": "Check whether the home indicator is currently hidden.\n\nReturns the current visibility state of the iOS home indicator.",
|
|
59
91
|
"complexTypes": [],
|
|
60
92
|
"slug": "ishidden"
|
|
61
93
|
},
|
|
@@ -67,14 +99,22 @@
|
|
|
67
99
|
"tags": [
|
|
68
100
|
{
|
|
69
101
|
"name": "returns",
|
|
70
|
-
"text": "
|
|
102
|
+
"text": "Promise that resolves with the plugin version"
|
|
71
103
|
},
|
|
72
104
|
{
|
|
73
105
|
"name": "throws",
|
|
74
|
-
"text": "
|
|
106
|
+
"text": "Error if getting the version fails"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "since",
|
|
110
|
+
"text": "0.0.1"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "example",
|
|
114
|
+
"text": "```typescript\nconst { version } = await HomeIndicator.getPluginVersion();\nconsole.log('Plugin version:', version);\n```"
|
|
75
115
|
}
|
|
76
116
|
],
|
|
77
|
-
"docs": "Get the native Capacitor plugin version",
|
|
117
|
+
"docs": "Get the native Capacitor plugin version.",
|
|
78
118
|
"complexTypes": [],
|
|
79
119
|
"slug": "getpluginversion"
|
|
80
120
|
}
|
|
@@ -1,32 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capacitor Home Indicator Plugin for controlling the iOS home indicator visibility.
|
|
3
|
+
* The home indicator is the horizontal bar at the bottom of iOS devices without a physical home button.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.0.1
|
|
6
|
+
*/
|
|
1
7
|
export interface HomeIndicatorPlugin {
|
|
2
8
|
/**
|
|
3
|
-
* Hide the home indicator.
|
|
9
|
+
* Hide the home indicator at the bottom of the screen.
|
|
4
10
|
*
|
|
11
|
+
* This visually hides the iOS home indicator bar, providing a more immersive
|
|
12
|
+
* full-screen experience. Users can still swipe up to access home, but the
|
|
13
|
+
* indicator will not be visible until they start the gesture.
|
|
14
|
+
*
|
|
15
|
+
* iOS only. Has no effect on Android or web.
|
|
16
|
+
*
|
|
17
|
+
* @returns Promise that resolves when the home indicator is hidden
|
|
18
|
+
* @throws Error if hiding the indicator fails
|
|
5
19
|
* @since 0.0.1
|
|
6
|
-
* @
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* await HomeIndicator.hide();
|
|
23
|
+
* ```
|
|
7
24
|
*/
|
|
8
25
|
hide(): Promise<void>;
|
|
9
26
|
/**
|
|
10
|
-
* Show the home indicator.
|
|
27
|
+
* Show the home indicator at the bottom of the screen.
|
|
28
|
+
*
|
|
29
|
+
* This restores the default iOS home indicator visibility, making it
|
|
30
|
+
* always visible to the user. This is the default behavior.
|
|
11
31
|
*
|
|
32
|
+
* iOS only. Has no effect on Android or web.
|
|
33
|
+
*
|
|
34
|
+
* @returns Promise that resolves when the home indicator is shown
|
|
35
|
+
* @throws Error if showing the indicator fails
|
|
12
36
|
* @since 0.0.1
|
|
13
|
-
* @
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* await HomeIndicator.show();
|
|
40
|
+
* ```
|
|
14
41
|
*/
|
|
15
42
|
show(): Promise<void>;
|
|
16
43
|
/**
|
|
17
|
-
*
|
|
44
|
+
* Check whether the home indicator is currently hidden.
|
|
45
|
+
*
|
|
46
|
+
* Returns the current visibility state of the iOS home indicator.
|
|
18
47
|
*
|
|
48
|
+
* @returns Promise that resolves with an object containing the hidden status
|
|
49
|
+
* @throws Error if checking the status fails
|
|
19
50
|
* @since 0.0.1
|
|
20
|
-
* @
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const { hidden } = await HomeIndicator.isHidden();
|
|
54
|
+
* if (hidden) {
|
|
55
|
+
* console.log('Home indicator is hidden');
|
|
56
|
+
* } else {
|
|
57
|
+
* console.log('Home indicator is visible');
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
21
60
|
*/
|
|
22
61
|
isHidden(): Promise<{
|
|
23
62
|
hidden: boolean;
|
|
24
63
|
}>;
|
|
25
64
|
/**
|
|
26
|
-
* Get the native Capacitor plugin version
|
|
65
|
+
* Get the native Capacitor plugin version.
|
|
27
66
|
*
|
|
28
|
-
* @returns
|
|
29
|
-
* @throws
|
|
67
|
+
* @returns Promise that resolves with the plugin version
|
|
68
|
+
* @throws Error if getting the version fails
|
|
69
|
+
* @since 0.0.1
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const { version } = await HomeIndicator.getPluginVersion();
|
|
73
|
+
* console.log('Plugin version:', version);
|
|
74
|
+
* ```
|
|
30
75
|
*/
|
|
31
76
|
getPluginVersion(): Promise<{
|
|
32
77
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Capacitor Home Indicator Plugin for controlling the iOS home indicator visibility.\n * The home indicator is the horizontal bar at the bottom of iOS devices without a physical home button.\n *\n * @since 0.0.1\n */\nexport interface HomeIndicatorPlugin {\n /**\n * Hide the home indicator at the bottom of the screen.\n *\n * This visually hides the iOS home indicator bar, providing a more immersive\n * full-screen experience. Users can still swipe up to access home, but the\n * indicator will not be visible until they start the gesture.\n *\n * iOS only. Has no effect on Android or web.\n *\n * @returns Promise that resolves when the home indicator is hidden\n * @throws Error if hiding the indicator fails\n * @since 0.0.1\n * @example\n * ```typescript\n * await HomeIndicator.hide();\n * ```\n */\n hide(): Promise<void>;\n\n /**\n * Show the home indicator at the bottom of the screen.\n *\n * This restores the default iOS home indicator visibility, making it\n * always visible to the user. This is the default behavior.\n *\n * iOS only. Has no effect on Android or web.\n *\n * @returns Promise that resolves when the home indicator is shown\n * @throws Error if showing the indicator fails\n * @since 0.0.1\n * @example\n * ```typescript\n * await HomeIndicator.show();\n * ```\n */\n show(): Promise<void>;\n\n /**\n * Check whether the home indicator is currently hidden.\n *\n * Returns the current visibility state of the iOS home indicator.\n *\n * @returns Promise that resolves with an object containing the hidden status\n * @throws Error if checking the status fails\n * @since 0.0.1\n * @example\n * ```typescript\n * const { hidden } = await HomeIndicator.isHidden();\n * if (hidden) {\n * console.log('Home indicator is hidden');\n * } else {\n * console.log('Home indicator is visible');\n * }\n * ```\n */\n isHidden(): Promise<{ hidden: boolean }>;\n\n /**\n * Get the native Capacitor plugin version.\n *\n * @returns Promise that resolves with the plugin version\n * @throws Error if getting the version fails\n * @since 0.0.1\n * @example\n * ```typescript\n * const { version } = await HomeIndicator.getPluginVersion();\n * console.log('Plugin version:', version);\n * ```\n */\n getPluginVersion(): Promise<{ version: string }>;\n}\n"]}
|
|
@@ -35,10 +35,10 @@ public class CapgoHomeIndicatorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
35
35
|
CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
|
|
36
36
|
]
|
|
37
37
|
|
|
38
|
-
private let
|
|
38
|
+
private let pluginVersion: String = "7.1.18"
|
|
39
39
|
|
|
40
40
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
41
|
-
call.resolve(["version": self.
|
|
41
|
+
call.resolve(["version": self.pluginVersion])
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@objc func hide(_ call: CAPPluginCall) {
|