@capgo/capacitor-updater 4.50.0 → 4.51.0
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.
|
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "4.
|
|
58
|
+
private final String PLUGIN_VERSION = "4.51.0";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -1175,6 +1175,12 @@ public class CapacitorUpdaterPlugin
|
|
|
1175
1175
|
}
|
|
1176
1176
|
|
|
1177
1177
|
public void appMovedToForeground() {
|
|
1178
|
+
final BundleInfo current =
|
|
1179
|
+
CapacitorUpdaterPlugin.this.implementation.getCurrentBundle();
|
|
1180
|
+
CapacitorUpdaterPlugin.this.implementation.sendStats(
|
|
1181
|
+
"app_moved_to_foreground",
|
|
1182
|
+
current.getVersionName()
|
|
1183
|
+
);
|
|
1178
1184
|
this._checkCancelDelay(true);
|
|
1179
1185
|
if (CapacitorUpdaterPlugin.this._isAutoUpdateEnabled()) {
|
|
1180
1186
|
this.backgroundDownload();
|
|
@@ -1183,6 +1189,12 @@ public class CapacitorUpdaterPlugin
|
|
|
1183
1189
|
}
|
|
1184
1190
|
|
|
1185
1191
|
public void appMovedToBackground() {
|
|
1192
|
+
final BundleInfo current =
|
|
1193
|
+
CapacitorUpdaterPlugin.this.implementation.getCurrentBundle();
|
|
1194
|
+
CapacitorUpdaterPlugin.this.implementation.sendStats(
|
|
1195
|
+
"app_moved_to_background",
|
|
1196
|
+
current.getVersionName()
|
|
1197
|
+
);
|
|
1186
1198
|
Log.i(CapacitorUpdater.TAG, "Checking for pending update");
|
|
1187
1199
|
try {
|
|
1188
1200
|
Gson gson = new Gson();
|
|
@@ -15,7 +15,7 @@ import Version
|
|
|
15
15
|
@objc(CapacitorUpdaterPlugin)
|
|
16
16
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
17
17
|
private var implementation = CapacitorUpdater()
|
|
18
|
-
private let PLUGIN_VERSION: String = "4.
|
|
18
|
+
private let PLUGIN_VERSION: String = "4.51.0"
|
|
19
19
|
static let updateUrlDefault = "https://api.capgo.app/updates"
|
|
20
20
|
static let statsUrlDefault = "https://api.capgo.app/stats"
|
|
21
21
|
static let channelUrlDefault = "https://api.capgo.app/channel_self"
|
|
@@ -630,6 +630,8 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
@objc func appMovedToForeground() {
|
|
633
|
+
let current: BundleInfo = self.implementation.getCurrentBundle()
|
|
634
|
+
self.implementation.sendStats(action: "app_moved_to_foreground", versionName: current.getVersionName())
|
|
633
635
|
if backgroundWork != nil && taskRunning {
|
|
634
636
|
backgroundWork!.cancel()
|
|
635
637
|
print("\(self.implementation.TAG) Background Timer Task canceled, Activity resumed before timer completes")
|
|
@@ -643,6 +645,8 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
643
645
|
}
|
|
644
646
|
|
|
645
647
|
@objc func appMovedToBackground() {
|
|
648
|
+
let current: BundleInfo = self.implementation.getCurrentBundle()
|
|
649
|
+
self.implementation.sendStats(action: "app_moved_to_background", versionName: current.getVersionName())
|
|
646
650
|
print("\(self.implementation.TAG) Check for pending update")
|
|
647
651
|
let delayUpdatePreferences = UserDefaults.standard.string(forKey: DELAY_CONDITION_PREFERENCES) ?? "[]"
|
|
648
652
|
|