Skip to content

Commit a157fc3

Browse files
committed
Merge branch 'master' of github.com:spoonconsulting/cordova-plugin-background-upload into fix-note8
2 parents c122281 + 87f37c4 commit a157fc3

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [4.0.2](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.2...4.0.3) (2022-03-24)
2+
* **android:** Use cordova.getThreadPool() for execute Method
3+
14
## [4.0.2](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.0...4.0.2) (2022-03-24)
25
* **android:** Used ScheduledExecutorService and OutofQuotaPolicy added for Android 12 and above
36

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spoonconsulting/cordova-plugin-background-upload",
3-
"version": "4.0.2",
3+
"version": "4.0.3",
44
"description": "Cordova plugin for uploading file in the background",
55
"cordova": {
66
"id": "@spoonconsulting/cordova-plugin-background-upload",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="@spoonconsulting/cordova-plugin-background-upload" version="4.0.2">
2+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="@spoonconsulting/cordova-plugin-background-upload" version="4.0.3">
33
<name>Cordova Background Upload Plugin</name>
44
<description>Background Upload plugin for Cordova</description>
55
<license>ISC</license>

src/android/FileTransferBackground.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ private void sendError(final String id, final String reason, boolean userCancele
121121

122122
@Override
123123
public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) {
124-
if(executorService == null) {
124+
if (executorService == null) {
125125
executorService = Executors.newScheduledThreadPool(4);
126126
}
127127

128-
executorService.schedule(() -> {
128+
cordova.getThreadPool().execute(() -> {
129129
try {
130130
switch (action) {
131131
case "initManager":
@@ -151,7 +151,7 @@ public boolean execute(String action, JSONArray args, final CallbackContext call
151151
callbackContext.sendPluginResult(result);
152152
exception.printStackTrace();
153153
}
154-
} , 0, TimeUnit.MILLISECONDS);
154+
});
155155

156156
return true;
157157
}

0 commit comments

Comments
 (0)