@capgo/capacitor-flash 7.1.7 → 7.1.9
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
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
|
|
3
3
|
|
|
4
4
|
<div align="center">
|
|
5
|
-
<h2><a href="https://capgo.app/?ref=
|
|
6
|
-
<h2><a href="https://capgo.app/consulting/?ref=
|
|
5
|
+
<h2><a href="https://capgo.app/?ref=plugin_flash"> ➡️ Get Instant updates for your App with Capgo</a></h2>
|
|
6
|
+
<h2><a href="https://capgo.app/consulting/?ref=plugin_flash"> Missing a feature? We’ll build the plugin for you 💪</a></h2>
|
|
7
7
|
</div>
|
|
8
8
|
Switch the Flashlight / Torch of your device.
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ import com.getcapacitor.annotation.PermissionCallback;
|
|
|
19
19
|
@CapacitorPlugin(name = "CapacitorFlash", permissions = { @Permission(alias = "camera", strings = { Manifest.permission.CAMERA }) })
|
|
20
20
|
public class CapacitorFlashPlugin extends Plugin {
|
|
21
21
|
|
|
22
|
-
private final String
|
|
22
|
+
private final String pluginVersion = "7.1.9";
|
|
23
23
|
|
|
24
24
|
private String cameraId;
|
|
25
25
|
boolean isFlashStateOn = false;
|
|
@@ -137,7 +137,7 @@ public class CapacitorFlashPlugin extends Plugin {
|
|
|
137
137
|
public void getPluginVersion(final PluginCall call) {
|
|
138
138
|
try {
|
|
139
139
|
final JSObject ret = new JSObject();
|
|
140
|
-
ret.put("version", this.
|
|
140
|
+
ret.put("version", this.pluginVersion);
|
|
141
141
|
call.resolve(ret);
|
|
142
142
|
} catch (final Exception e) {
|
|
143
143
|
call.reject("Could not get plugin version", e);
|
|
@@ -7,7 +7,7 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(CapacitorFlashPlugin)
|
|
9
9
|
public class CapacitorFlashPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
-
private let
|
|
10
|
+
private let pluginVersion: String = "7.1.9"
|
|
11
11
|
public let identifier = "CapacitorFlashPlugin"
|
|
12
12
|
public let jsName = "CapacitorFlash"
|
|
13
13
|
public let pluginMethods: [CAPPluginMethod] = [
|
|
@@ -53,7 +53,7 @@ public class CapacitorFlashPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
@objc func getPluginVersion(_ call: CAPPluginCall) {
|
|
56
|
-
call.resolve(["version": self.
|
|
56
|
+
call.resolve(["version": self.pluginVersion])
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
}
|