@capgo/capacitor-updater 5.2.13 → 5.2.14

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.
@@ -58,7 +58,7 @@ public class CapacitorUpdaterPlugin
58
58
  private static final String channelUrlDefault =
59
59
  "https://api.capgo.app/channel_self";
60
60
 
61
- private final String PLUGIN_VERSION = "5.2.13";
61
+ private final String PLUGIN_VERSION = "5.2.14";
62
62
  private static final String DELAY_CONDITION_PREFERENCES = "";
63
63
 
64
64
  private SharedPreferences.Editor editor;
@@ -85,6 +85,16 @@ public class CapacitorUpdaterPlugin
85
85
  @Override
86
86
  public void load() {
87
87
  super.load();
88
+ new Thread(() -> {
89
+ try {
90
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady load");
91
+ CapacitorUpdaterPlugin.this.semaphoreReady.await(0, TimeUnit.SECONDS);
92
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady load done");
93
+ } catch (InterruptedException e) {
94
+ e.printStackTrace();
95
+ }
96
+ })
97
+ .start();
88
98
  this.prefs =
89
99
  this.getContext()
90
100
  .getSharedPreferences(
@@ -186,12 +196,12 @@ public class CapacitorUpdaterPlugin
186
196
  CapacitorUpdaterPlugin.this._reload();
187
197
  new Thread(() -> {
188
198
  try {
189
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady directUpdateFinish");
199
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady directUpdateFinish");
190
200
  CapacitorUpdaterPlugin.this.semaphoreReady.await(
191
201
  CapacitorUpdaterPlugin.this.appReadyTimeout,
192
202
  TimeUnit.SECONDS
193
203
  );
194
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady directUpdateFinish done");
204
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady directUpdateFinish done");
195
205
  } catch (InterruptedException e) {
196
206
  e.printStackTrace();
197
207
  }
@@ -459,9 +469,9 @@ public class CapacitorUpdaterPlugin
459
469
  final String path = this.implementation.getCurrentBundlePath();
460
470
  new Thread(() -> {
461
471
  try {
462
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady _reload");
472
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady _reload");
463
473
  CapacitorUpdaterPlugin.this.semaphoreReady.await(0, TimeUnit.SECONDS);
464
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady _reload done");
474
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady _reload done");
465
475
  } catch (InterruptedException e) {
466
476
  e.printStackTrace();
467
477
  }
@@ -684,9 +694,9 @@ public class CapacitorUpdaterPlugin
684
694
  "Current bundle loaded successfully. ['notifyAppReady()' was called] " +
685
695
  bundle
686
696
  );
687
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady countDown");
697
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady countDown");
688
698
  this.semaphoreReady.countDown();
689
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady countDown done");
699
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady countDown done");
690
700
  call.resolve();
691
701
  } catch (final Exception e) {
692
702
  Log.e(
@@ -899,10 +909,18 @@ public class CapacitorUpdaterPlugin
899
909
  ret.put("message", msg);
900
910
  new Thread(() -> {
901
911
  try {
912
+ Log.i(
913
+ CapacitorUpdater.TAG,
914
+ "semaphoreReady endBackGroundTaskWithNotif"
915
+ );
902
916
  CapacitorUpdaterPlugin.this.semaphoreReady.await(
903
917
  CapacitorUpdaterPlugin.this.appReadyTimeout,
904
918
  TimeUnit.SECONDS
905
919
  );
920
+ Log.i(
921
+ CapacitorUpdater.TAG,
922
+ "semaphoreReady endBackGroundTaskWithNotif done"
923
+ );
906
924
  } catch (InterruptedException e) {
907
925
  e.printStackTrace();
908
926
  }
@@ -1280,12 +1298,12 @@ public class CapacitorUpdaterPlugin
1280
1298
  Log.i(CapacitorUpdater.TAG, "Auto update is disabled");
1281
1299
  new Thread(() -> {
1282
1300
  try {
1283
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady Auto update");
1301
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady Auto update");
1284
1302
  CapacitorUpdaterPlugin.this.semaphoreReady.await(
1285
1303
  CapacitorUpdaterPlugin.this.appReadyTimeout,
1286
1304
  TimeUnit.SECONDS
1287
1305
  );
1288
- // Log.i(CapacitorUpdater.TAG, "semaphoreReady Auto update done");
1306
+ Log.i(CapacitorUpdater.TAG, "semaphoreReady Auto update done");
1289
1307
  } catch (InterruptedException e) {
1290
1308
  e.printStackTrace();
1291
1309
  }
@@ -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 = "5.2.13"
18
+ private let PLUGIN_VERSION: String = "5.2.14"
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "5.2.13",
3
+ "version": "5.2.14",
4
4
  "packageManager": "pnpm@8.6.12",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",