@capgo/capacitor-updater 7.7.8 → 7.7.10
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.
|
@@ -60,7 +60,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
60
60
|
private static final String statsUrlDefault = "https://plugin.capgo.app/stats";
|
|
61
61
|
private static final String channelUrlDefault = "https://plugin.capgo.app/channel_self";
|
|
62
62
|
|
|
63
|
-
private final String PLUGIN_VERSION = "7.7.
|
|
63
|
+
private final String PLUGIN_VERSION = "7.7.10";
|
|
64
64
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
65
65
|
|
|
66
66
|
private SharedPreferences.Editor editor;
|
|
@@ -1148,6 +1148,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
1148
1148
|
|
|
1149
1149
|
private Thread backgroundDownload() {
|
|
1150
1150
|
boolean shouldDirectUpdate = this.shouldUseDirectUpdate();
|
|
1151
|
+
this.implementation.directUpdate = shouldDirectUpdate;
|
|
1151
1152
|
String messageUpdate = shouldDirectUpdate ? "Update will occur now." : "Update will occur next time app moves to background.";
|
|
1152
1153
|
return startNewThread(() -> {
|
|
1153
1154
|
logger.info("Check for update via: " + CapacitorUpdaterPlugin.this.updateUrl);
|
|
@@ -1485,9 +1486,10 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
1485
1486
|
public void handleOnStart() {
|
|
1486
1487
|
try {
|
|
1487
1488
|
if (isPreviousMainActivity) {
|
|
1489
|
+
logger.info("handleOnStart: appMovedToForeground");
|
|
1488
1490
|
this.appMovedToForeground();
|
|
1489
1491
|
}
|
|
1490
|
-
logger.info("onActivityStarted " + getActivity().getClass().getName());
|
|
1492
|
+
logger.info("handleOnStart: onActivityStarted " + getActivity().getClass().getName());
|
|
1491
1493
|
isPreviousMainActivity = true;
|
|
1492
1494
|
|
|
1493
1495
|
// Initialize shake menu if enabled and activity is BridgeActivity
|
|
@@ -1509,6 +1511,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
1509
1511
|
try {
|
|
1510
1512
|
isPreviousMainActivity = isMainActivity();
|
|
1511
1513
|
if (isPreviousMainActivity) {
|
|
1514
|
+
logger.info("handleOnStop: appMovedToBackground");
|
|
1512
1515
|
this.appMovedToBackground();
|
|
1513
1516
|
}
|
|
1514
1517
|
} catch (Exception e) {
|
|
@@ -183,7 +183,7 @@ public class DelayUpdateUtils {
|
|
|
183
183
|
try {
|
|
184
184
|
this.editor.putLong(BACKGROUND_TIMESTAMP_KEY, backgroundTimestamp);
|
|
185
185
|
this.editor.commit();
|
|
186
|
-
logger.info("
|
|
186
|
+
logger.info("Background timestamp set");
|
|
187
187
|
} catch (final Exception e) {
|
|
188
188
|
logger.error("Failed to delay update, [Error calling '_setBackgroundTimestamp()'] " + e.getMessage());
|
|
189
189
|
}
|
|
@@ -193,7 +193,7 @@ public class DelayUpdateUtils {
|
|
|
193
193
|
try {
|
|
194
194
|
this.editor.remove(BACKGROUND_TIMESTAMP_KEY);
|
|
195
195
|
this.editor.commit();
|
|
196
|
-
logger.info("
|
|
196
|
+
logger.info("Background timestamp unset");
|
|
197
197
|
} catch (final Exception e) {
|
|
198
198
|
logger.error("Failed to delay update, [Error calling '_unsetBackgroundTimestamp()'] " + e.getMessage());
|
|
199
199
|
}
|
|
@@ -50,7 +50,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
50
50
|
CAPPluginMethod(name: "isShakeMenuEnabled", returnType: CAPPluginReturnPromise)
|
|
51
51
|
]
|
|
52
52
|
public var implementation = CapgoUpdater()
|
|
53
|
-
private let PLUGIN_VERSION: String = "7.7.
|
|
53
|
+
private let PLUGIN_VERSION: String = "7.7.10"
|
|
54
54
|
static let updateUrlDefault = "https://plugin.capgo.app/updates"
|
|
55
55
|
static let statsUrlDefault = "https://plugin.capgo.app/stats"
|
|
56
56
|
static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
|