@capgo/capacitor-updater 6.0.64 → 6.0.66

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 extends Plugin {
55
55
  private static final String channelUrlDefault =
56
56
  "https://api.capgo.app/channel_self";
57
57
 
58
- private final String PLUGIN_VERSION = "6.0.64";
58
+ private final String PLUGIN_VERSION = "6.0.66";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -103,6 +103,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
103
103
  @Override
104
104
  public void load() {
105
105
  super.load();
106
+ this.counterActivityCreate++;
106
107
  this.prefs = this.getContext()
107
108
  .getSharedPreferences(WebView.WEBVIEW_PREFS_NAME, Activity.MODE_PRIVATE);
108
109
  this.editor = this.prefs.edit();
@@ -222,7 +223,6 @@ public class CapacitorUpdaterPlugin extends Plugin {
222
223
  if (resetWhenUpdate) {
223
224
  this.cleanupObsoleteVersions();
224
225
  }
225
-
226
226
  this.checkForUpdateAfterDelay();
227
227
  }
228
228
 
@@ -1537,9 +1537,6 @@ public class CapacitorUpdaterPlugin extends Plugin {
1537
1537
 
1538
1538
  @Override
1539
1539
  public void handleOnStart() {
1540
- this.counterActivityCreate++;
1541
- // @Override
1542
- // public void onActivityStarted(@NonNull final Activity activity) {
1543
1540
  if (isPreviousMainActivity) {
1544
1541
  this.appMovedToForeground();
1545
1542
  }
@@ -1552,8 +1549,6 @@ public class CapacitorUpdaterPlugin extends Plugin {
1552
1549
 
1553
1550
  @Override
1554
1551
  public void handleOnStop() {
1555
- // @Override
1556
- // public void onActivityStopped(@NonNull final Activity activity) {
1557
1552
  isPreviousMainActivity = isMainActivity();
1558
1553
  if (isPreviousMainActivity) {
1559
1554
  this.appMovedToBackground();
@@ -1562,8 +1557,6 @@ public class CapacitorUpdaterPlugin extends Plugin {
1562
1557
 
1563
1558
  @Override
1564
1559
  public void handleOnResume() {
1565
- // @Override
1566
- // public void onActivityResumed(@NonNull final Activity activity) {
1567
1560
  if (backgroundTask != null && taskRunning) {
1568
1561
  backgroundTask.interrupt();
1569
1562
  }
@@ -1573,35 +1566,12 @@ public class CapacitorUpdaterPlugin extends Plugin {
1573
1566
 
1574
1567
  @Override
1575
1568
  public void handleOnPause() {
1576
- // @Override
1577
- // public void onActivityPaused(@NonNull final Activity activity) {
1578
1569
  this.implementation.activity = getActivity();
1579
1570
  this.implementation.onPause();
1580
1571
  }
1581
1572
 
1582
- // @Override
1583
- // public void handleOnDestroy() {
1584
- // @Override
1585
- // public void onActivityCreated(
1586
- // @NonNull final Activity activity,
1587
- // @Nullable final Bundle savedInstanceState
1588
- // ) {
1589
- // this.implementation.activity = activity;
1590
- // this.counterActivityCreate++;
1591
- // }
1592
- //
1593
- // @Override
1594
- // public void onActivitySaveInstanceState(
1595
- // @NonNull final Activity activity,
1596
- // @NonNull final Bundle outState
1597
- // ) {
1598
- // this.implementation.activity = activity;
1599
- // }
1600
-
1601
1573
  @Override
1602
1574
  public void handleOnDestroy() {
1603
- // @Override
1604
- // public void onActivityDestroyed(@NonNull final Activity activity) {
1605
1575
  Log.i(
1606
1576
  CapacitorUpdater.TAG,
1607
1577
  "onActivityDestroyed " + getActivity().getClass().getName()
@@ -15,7 +15,7 @@ import Version
15
15
  @objc(CapacitorUpdaterPlugin)
16
16
  public class CapacitorUpdaterPlugin: CAPPlugin {
17
17
  public var implementation = CapacitorUpdater()
18
- private let PLUGIN_VERSION: String = "6.0.64"
18
+ private let PLUGIN_VERSION: String = "6.0.66"
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"
@@ -674,7 +674,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
674
674
  if res.major == true {
675
675
  self.notifyListeners("majorAvailable", data: ["version": res.version])
676
676
  }
677
- self.endBackGroundTaskWithNotif(msg: res.message ?? "", latestVersionName: res.version, current: current, error: false)
677
+ self.endBackGroundTaskWithNotif(msg: res.message ?? "", latestVersionName: res.version, current: current, error: true)
678
678
  return
679
679
  }
680
680
  let sessionKey = res.sessionKey ?? ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "6.0.64",
3
+ "version": "6.0.66",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",