@capgo/capacitor-shake 8.0.2 → 8.0.4
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.
|
@@ -13,22 +13,15 @@ import com.squareup.seismic.ShakeDetector;
|
|
|
13
13
|
@CapacitorPlugin(name = "CapacitorShake")
|
|
14
14
|
public class CapacitorShakePlugin extends Plugin implements ShakeDetector.Listener {
|
|
15
15
|
|
|
16
|
-
private final String pluginVersion = "8.0.
|
|
16
|
+
private final String pluginVersion = "8.0.4";
|
|
17
17
|
|
|
18
18
|
@Override
|
|
19
19
|
public void load() {
|
|
20
20
|
super.load();
|
|
21
21
|
|
|
22
|
-
SensorManager sensorManager =
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (sensorManager == null) {
|
|
27
|
-
Log.e("CapacitorShakePlugin", "This device couldn't find SENSOR_SERVICE. Perhaps your device doesn't support it");
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
Log.e("CapacitorShakePlugin", "This device doesn't support the getSystemService. Minimal android version: 23");
|
|
22
|
+
SensorManager sensorManager = (SensorManager) this.bridge.getActivity().getSystemService(Context.SENSOR_SERVICE);
|
|
23
|
+
if (sensorManager == null) {
|
|
24
|
+
Log.e("CapacitorShakePlugin", "This device couldn't find SENSOR_SERVICE. Perhaps your device doesn't support it");
|
|
32
25
|
return;
|
|
33
26
|
}
|
|
34
27
|
|
|
@@ -20,7 +20,7 @@ extension UIWindow {
|
|
|
20
20
|
*/
|
|
21
21
|
@objc(CapacitorShakePlugin)
|
|
22
22
|
public class CapacitorShakePlugin: CAPPlugin, CAPBridgedPlugin {
|
|
23
|
-
private let pluginVersion: String = "8.0.
|
|
23
|
+
private let pluginVersion: String = "8.0.4"
|
|
24
24
|
public let identifier = "CapacitorShakePlugin"
|
|
25
25
|
public let jsName = "CapacitorShake"
|
|
26
26
|
public let pluginMethods: [CAPPluginMethod] = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-shake",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.4",
|
|
4
4
|
"description": "Detect shake gesture in device",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
44
44
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
45
45
|
"eslint": "eslint .",
|
|
46
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
46
|
+
"prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
47
47
|
"swiftlint": "node-swiftlint",
|
|
48
48
|
"docgen": "docgen --api CapacitorShakePlugin --output-readme README.md --output-json dist/docs.json",
|
|
49
49
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"rimraf": "^6.1.0",
|
|
70
70
|
"rollup": "^4.53.2",
|
|
71
71
|
"swiftlint": "^2.0.0",
|
|
72
|
-
"typescript": "^5.9.3"
|
|
72
|
+
"typescript": "^5.9.3",
|
|
73
|
+
"prettier-pretty-check": "^0.2.0"
|
|
73
74
|
},
|
|
74
75
|
"peerDependencies": {
|
|
75
76
|
"@capacitor/core": ">=8.0.0"
|