@capgo/capacitor-updater 4.61.8 → 4.61.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.
@@ -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.61.8";
58
+ private final String PLUGIN_VERSION = "4.61.10";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -1254,23 +1254,21 @@ public class CapacitorUpdaterPlugin
1254
1254
  }
1255
1255
 
1256
1256
  private boolean isMainActivity() {
1257
- try {
1258
- Context mContext = this.getContext();
1259
- ActivityManager activityManager =
1260
- (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
1261
- List<ActivityManager.AppTask> runningTasks =
1262
- activityManager.getAppTasks();
1263
- ActivityManager.RecentTaskInfo runningTask = runningTasks
1264
- .get(0)
1265
- .getTaskInfo();
1266
- String className = runningTask.baseIntent.getComponent().getClassName();
1267
- String runningActivity = runningTask.topActivity.getClassName();
1268
- boolean isThisAppActivity = className.equals(runningActivity);
1269
- return isThisAppActivity;
1270
- } catch (final Exception e) {
1271
- Log.e(CapacitorUpdater.TAG, "Error getting Main Activity", e);
1257
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
1272
1258
  return false;
1273
1259
  }
1260
+ Context mContext = this.getContext();
1261
+ ActivityManager activityManager =
1262
+ (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
1263
+ List<ActivityManager.AppTask> runningTasks =
1264
+ activityManager.getAppTasks();
1265
+ ActivityManager.RecentTaskInfo runningTask = runningTasks
1266
+ .get(0)
1267
+ .getTaskInfo();
1268
+ String className = runningTask.baseIntent.getComponent().getClassName();
1269
+ String runningActivity = runningTask.topActivity.getClassName();
1270
+ boolean isThisAppActivity = className.equals(runningActivity);
1271
+ return isThisAppActivity;
1274
1272
  }
1275
1273
 
1276
1274
  private void appKilled() {
@@ -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.61.8"
18
+ private let PLUGIN_VERSION: String = "4.61.10"
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": "4.61.8",
3
+ "version": "4.61.10",
4
4
  "packageManager": "pnpm@8.5.1",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",
@@ -74,7 +74,7 @@
74
74
  "typescript": "^5.0.4"
75
75
  },
76
76
  "peerDependencies": {
77
- "@capacitor/core": "^5.0.0"
77
+ "@capacitor/core": "^4.0.0"
78
78
  },
79
79
  "prettier": "@ionic/prettier-config",
80
80
  "swiftlint": "@ionic/swiftlint-config",