@capgo/capacitor-home-indicator 7.1.24 → 8.0.3
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/CapgoHomeIndicator.podspec +1 -1
- package/Package.swift +2 -2
- package/android/build.gradle +9 -9
- package/android/src/main/java/ee/forgr/home_indicator/HomeIndicatorPlugin.java +48 -48
- package/ios/Sources/CapgoHomeIndicatorPlugin/CapgoHomeIndicatorPlugin.swift +1 -1
- package/package.json +15 -12
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '15.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.1'
|
|
17
17
|
end
|
package/Package.swift
CHANGED
|
@@ -3,14 +3,14 @@ import PackageDescription
|
|
|
3
3
|
|
|
4
4
|
let package = Package(
|
|
5
5
|
name: "CapgoHomeIndicator",
|
|
6
|
-
platforms: [.iOS(.
|
|
6
|
+
platforms: [.iOS(.v15)],
|
|
7
7
|
products: [
|
|
8
8
|
.library(
|
|
9
9
|
name: "CapgoHomeIndicator",
|
|
10
10
|
targets: ["CapgoHomeIndicatorPlugin"])
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0")
|
|
14
14
|
],
|
|
15
15
|
targets: [
|
|
16
16
|
.target(
|
package/android/build.gradle
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
@@ -11,18 +11,18 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.13.0'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
-
namespace "ee.forgr.home_indicator"
|
|
22
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
21
|
+
namespace = "ee.forgr.home_indicator"
|
|
22
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
|
|
23
23
|
defaultConfig {
|
|
24
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
25
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
26
26
|
versionCode 1
|
|
27
27
|
versionName "1.0"
|
|
28
28
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -34,7 +34,7 @@ android {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
lintOptions {
|
|
37
|
-
abortOnError false
|
|
37
|
+
abortOnError = false
|
|
38
38
|
}
|
|
39
39
|
compileOptions {
|
|
40
40
|
sourceCompatibility JavaVersion.VERSION_21
|
|
@@ -84,25 +84,25 @@ public class HomeIndicatorPlugin extends Plugin {
|
|
|
84
84
|
super.load();
|
|
85
85
|
this.UiChangeListener();
|
|
86
86
|
getActivity().runOnUiThread(
|
|
87
|
+
new Runnable() {
|
|
88
|
+
@Override
|
|
89
|
+
public void run() {
|
|
90
|
+
// Don't set any UI visibility flags on load - let the app control this
|
|
91
|
+
HomeIndicatorPlugin.this.setCssVar();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
96
|
+
// start task after 500ms in android
|
|
97
|
+
new Handler().postDelayed(
|
|
87
98
|
new Runnable() {
|
|
88
99
|
@Override
|
|
89
100
|
public void run() {
|
|
90
|
-
// Don't set any UI visibility flags on load - let the app control this
|
|
91
101
|
HomeIndicatorPlugin.this.setCssVar();
|
|
92
102
|
}
|
|
93
|
-
}
|
|
103
|
+
},
|
|
104
|
+
1000
|
|
94
105
|
);
|
|
95
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
96
|
-
// start task after 500ms in android
|
|
97
|
-
new Handler().postDelayed(
|
|
98
|
-
new Runnable() {
|
|
99
|
-
@Override
|
|
100
|
-
public void run() {
|
|
101
|
-
HomeIndicatorPlugin.this.setCssVar();
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
1000
|
|
105
|
-
);
|
|
106
106
|
}
|
|
107
107
|
// Add orientation change listener
|
|
108
108
|
orientationEventListener = new OrientationEventListener(getContext()) {
|
|
@@ -123,53 +123,53 @@ public class HomeIndicatorPlugin extends Plugin {
|
|
|
123
123
|
@PluginMethod
|
|
124
124
|
public void hide(PluginCall call) {
|
|
125
125
|
getActivity().runOnUiThread(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
126
|
+
new Runnable() {
|
|
127
|
+
@Override
|
|
128
|
+
public void run() {
|
|
129
|
+
View decorView = getActivity().getWindow().getDecorView();
|
|
130
|
+
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
|
131
|
+
decorView.setSystemUiVisibility(uiOptions);
|
|
132
|
+
HomeIndicatorPlugin.this.setCssVar();
|
|
133
|
+
JSObject ret = new JSObject();
|
|
134
|
+
call.resolve(ret);
|
|
136
135
|
}
|
|
137
|
-
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
@PluginMethod
|
|
141
141
|
public void show(PluginCall call) {
|
|
142
142
|
getActivity().runOnUiThread(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
143
|
+
new Runnable() {
|
|
144
|
+
@Override
|
|
145
|
+
public void run() {
|
|
146
|
+
View decorView = getActivity().getWindow().getDecorView();
|
|
147
|
+
// Get current flags and remove only the navigation-related ones
|
|
148
|
+
int currentFlags = decorView.getSystemUiVisibility();
|
|
149
|
+
int newFlags = currentFlags & ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
|
150
|
+
decorView.setSystemUiVisibility(newFlags);
|
|
151
|
+
HomeIndicatorPlugin.this.setCssVar();
|
|
152
|
+
JSObject ret = new JSObject();
|
|
153
|
+
call.resolve(ret);
|
|
155
154
|
}
|
|
156
|
-
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
@PluginMethod
|
|
160
160
|
public void isHidden(PluginCall call) {
|
|
161
161
|
getActivity().runOnUiThread(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
162
|
+
new Runnable() {
|
|
163
|
+
@Override
|
|
164
|
+
public void run() {
|
|
165
|
+
View decorView = getActivity().getWindow().getDecorView();
|
|
166
|
+
int uiOptions = decorView.getSystemUiVisibility();
|
|
167
|
+
HomeIndicatorPlugin.this.setCssVar();
|
|
168
|
+
JSObject ret = new JSObject();
|
|
169
|
+
ret.put("hidden", (uiOptions & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
|
170
|
+
call.resolve(ret);
|
|
172
171
|
}
|
|
173
|
-
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -35,7 +35,7 @@ public class CapgoHomeIndicatorPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
35
35
|
CAPPluginMethod(name: "getPluginVersion", returnType: CAPPluginReturnPromise)
|
|
36
36
|
]
|
|
37
37
|
|
|
38
|
-
private let pluginVersion: String = "
|
|
38
|
+
private let pluginVersion: String = "8.0.3"
|
|
39
39
|
|
|
40
40
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
41
41
|
call.resolve(["version": self.pluginVersion])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-home-indicator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "hide and show home button indicator in Capacitor app",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/Cap-go/capacitor-home-indicator/issues"
|
|
26
26
|
},
|
|
27
|
+
"homepage": "https://capgo.app/docs/plugins/home-indicator/",
|
|
27
28
|
"keywords": [
|
|
28
29
|
"capacitor",
|
|
29
30
|
"plugin",
|
|
@@ -48,23 +49,25 @@
|
|
|
48
49
|
"prepublishOnly": "npm run build"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@capacitor/android": "^
|
|
52
|
-
"@capacitor/core": "^
|
|
53
|
-
"@capacitor/docgen": "^0.3.
|
|
54
|
-
"@capacitor/ios": "^
|
|
52
|
+
"@capacitor/android": "^8.0.0",
|
|
53
|
+
"@capacitor/core": "^8.0.0",
|
|
54
|
+
"@capacitor/docgen": "^0.3.1",
|
|
55
|
+
"@capacitor/ios": "^8.0.0",
|
|
55
56
|
"@ionic/eslint-config": "^0.4.0",
|
|
56
57
|
"@ionic/prettier-config": "^4.0.0",
|
|
57
58
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
59
|
+
"@types/node": "^24.10.1",
|
|
60
|
+
"eslint": "^8.57.1",
|
|
61
|
+
"eslint-plugin-import": "^2.31.0",
|
|
62
|
+
"prettier": "^3.6.2",
|
|
63
|
+
"prettier-plugin-java": "^2.7.7",
|
|
64
|
+
"rimraf": "^6.1.0",
|
|
65
|
+
"rollup": "^4.53.2",
|
|
63
66
|
"swiftlint": "^2.0.0",
|
|
64
|
-
"typescript": "
|
|
67
|
+
"typescript": "^5.9.3"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
67
|
-
"@capacitor/core": ">=
|
|
70
|
+
"@capacitor/core": ">=8.0.0"
|
|
68
71
|
},
|
|
69
72
|
"prettier": "@ionic/prettier-config",
|
|
70
73
|
"swiftlint": "@ionic/swiftlint-config",
|