native-update 1.4.2 → 1.4.3

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.
@@ -11,8 +11,8 @@ buildscript {
11
11
 
12
12
  ext {
13
13
  kotlinVersion = '1.9.22'
14
- compileSdkVersion = 34
15
- targetSdkVersion = 34
14
+ compileSdkVersion = 36
15
+ targetSdkVersion = 36
16
16
  minSdkVersion = 21
17
17
  androidxAppCompatVersion = '1.6.1'
18
18
  androidxCoreVersion = '1.13.1'
@@ -49,7 +49,7 @@ class BackgroundUpdatePlugin : Plugin() {
49
49
  if (config.enabled) {
50
50
  scheduleBackgroundWork(config.checkInterval.toLong())
51
51
  } else {
52
- disableBackgroundUpdates()
52
+ cancelAllBackgroundWork()
53
53
  }
54
54
 
55
55
  call.resolve()
@@ -113,7 +113,7 @@ class BackgroundUpdatePlugin : Plugin() {
113
113
  call.resolve(JSObject().put("granted", granted))
114
114
  }
115
115
 
116
- private fun disableBackgroundUpdates() {
116
+ internal fun cancelAllBackgroundWork() {
117
117
  backgroundUpdateStatus.enabled = false
118
118
  backgroundUpdateStatus.isRunning = false
119
119
  backgroundUpdateStatus.currentTaskId = null
@@ -1,5 +1,6 @@
1
1
  package com.aoneahsan.nativeupdate
2
2
 
3
+ import com.getcapacitor.JSObject
3
4
  import com.getcapacitor.Plugin
4
5
  import com.getcapacitor.PluginCall
5
6
  import com.getcapacitor.PluginMethod
@@ -86,7 +87,7 @@ class NativeUpdatePlugin : Plugin() {
86
87
  try {
87
88
  // Clean up any resources
88
89
  liveUpdatePlugin.cleanup()
89
- backgroundUpdatePlugin.disableBackgroundUpdates()
90
+ backgroundUpdatePlugin.cancelAllBackgroundWork()
90
91
  call.resolve()
91
92
  } catch (e: Exception) {
92
93
  call.reject("Cleanup failed", e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-update",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "engines": {
5
5
  "node": ">=24.13.0"
6
6
  },