├── .github
└── workflows
│ └── npmpublish.yml
├── .gitignore
├── .npmignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── demo
├── .browserslistrc
├── .editorconfig
├── .eslintrc.json
├── .gitignore
├── .npmignore
├── README.md
├── angular.json
├── config.xml
├── ionic.config.json
├── package-lock.json
├── package.json
├── resources
│ ├── README.md
│ ├── android
│ │ ├── icon
│ │ │ ├── drawable-hdpi-icon.png
│ │ │ ├── drawable-ldpi-icon.png
│ │ │ ├── drawable-mdpi-icon.png
│ │ │ ├── drawable-xhdpi-icon.png
│ │ │ ├── drawable-xxhdpi-icon.png
│ │ │ └── drawable-xxxhdpi-icon.png
│ │ ├── splash
│ │ │ ├── drawable-land-hdpi-screen.png
│ │ │ ├── drawable-land-ldpi-screen.png
│ │ │ ├── drawable-land-mdpi-screen.png
│ │ │ ├── drawable-land-xhdpi-screen.png
│ │ │ ├── drawable-land-xxhdpi-screen.png
│ │ │ ├── drawable-land-xxxhdpi-screen.png
│ │ │ ├── drawable-port-hdpi-screen.png
│ │ │ ├── drawable-port-ldpi-screen.png
│ │ │ ├── drawable-port-mdpi-screen.png
│ │ │ ├── drawable-port-xhdpi-screen.png
│ │ │ ├── drawable-port-xxhdpi-screen.png
│ │ │ └── drawable-port-xxxhdpi-screen.png
│ │ └── xml
│ │ │ └── network_security_config.xml
│ ├── icon.png
│ ├── ios
│ │ ├── icon
│ │ │ ├── icon-1024.png
│ │ │ ├── icon-108@2x.png
│ │ │ ├── icon-20.png
│ │ │ ├── icon-20@2x.png
│ │ │ ├── icon-20@3x.png
│ │ │ ├── icon-24@2x.png
│ │ │ ├── icon-27.5@2x.png
│ │ │ ├── icon-29.png
│ │ │ ├── icon-29@2x.png
│ │ │ ├── icon-29@3x.png
│ │ │ ├── icon-40.png
│ │ │ ├── icon-40@2x.png
│ │ │ ├── icon-40@3x.png
│ │ │ ├── icon-44@2x.png
│ │ │ ├── icon-50.png
│ │ │ ├── icon-50@2x.png
│ │ │ ├── icon-60.png
│ │ │ ├── icon-60@2x.png
│ │ │ ├── icon-60@3x.png
│ │ │ ├── icon-72.png
│ │ │ ├── icon-72@2x.png
│ │ │ ├── icon-76.png
│ │ │ ├── icon-76@2x.png
│ │ │ ├── icon-83.5@2x.png
│ │ │ ├── icon-86@2x.png
│ │ │ ├── icon-98@2x.png
│ │ │ ├── icon-small.png
│ │ │ ├── icon-small@2x.png
│ │ │ ├── icon-small@3x.png
│ │ │ ├── icon.png
│ │ │ └── icon@2x.png
│ │ └── splash
│ │ │ ├── Default-1792h~iphone.png
│ │ │ ├── Default-2436h.png
│ │ │ ├── Default-2688h~iphone.png
│ │ │ ├── Default-568h@2x~iphone.png
│ │ │ ├── Default-667h.png
│ │ │ ├── Default-736h.png
│ │ │ ├── Default-Landscape-1792h~iphone.png
│ │ │ ├── Default-Landscape-2436h.png
│ │ │ ├── Default-Landscape-2688h~iphone.png
│ │ │ ├── Default-Landscape-736h.png
│ │ │ ├── Default-Landscape@2x~ipad.png
│ │ │ ├── Default-Landscape@~ipadpro.png
│ │ │ ├── Default-Landscape~ipad.png
│ │ │ ├── Default-Portrait@2x~ipad.png
│ │ │ ├── Default-Portrait@~ipadpro.png
│ │ │ ├── Default-Portrait~ipad.png
│ │ │ ├── Default@2x~iphone.png
│ │ │ ├── Default@2x~universal~anyany.png
│ │ │ └── Default~iphone.png
│ └── splash.png
├── src
│ ├── app
│ │ ├── app-routing.module.ts
│ │ ├── app.component.html
│ │ ├── app.component.scss
│ │ ├── app.component.spec.ts
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ ├── explore-container
│ │ │ ├── explore-container.component.html
│ │ │ ├── explore-container.component.scss
│ │ │ ├── explore-container.component.spec.ts
│ │ │ ├── explore-container.component.ts
│ │ │ └── explore-container.module.ts
│ │ ├── tab1
│ │ │ ├── tab1-routing.module.ts
│ │ │ ├── tab1.module.ts
│ │ │ ├── tab1.page.html
│ │ │ ├── tab1.page.scss
│ │ │ ├── tab1.page.spec.ts
│ │ │ └── tab1.page.ts
│ │ ├── tab2
│ │ │ ├── tab2-routing.module.ts
│ │ │ ├── tab2.module.ts
│ │ │ ├── tab2.page.html
│ │ │ ├── tab2.page.scss
│ │ │ ├── tab2.page.spec.ts
│ │ │ └── tab2.page.ts
│ │ ├── tab3
│ │ │ ├── tab3-routing.module.ts
│ │ │ ├── tab3.module.ts
│ │ │ ├── tab3.page.html
│ │ │ ├── tab3.page.scss
│ │ │ ├── tab3.page.spec.ts
│ │ │ └── tab3.page.ts
│ │ └── tabs
│ │ │ ├── tabs-routing.module.ts
│ │ │ ├── tabs.module.ts
│ │ │ ├── tabs.page.html
│ │ │ ├── tabs.page.scss
│ │ │ ├── tabs.page.spec.ts
│ │ │ └── tabs.page.ts
│ ├── assets
│ │ ├── icon
│ │ │ └── favicon.png
│ │ └── shapes.svg
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── global.scss
│ ├── index.html
│ ├── main.ts
│ ├── polyfills.ts
│ ├── theme
│ │ └── variables.scss
│ └── zone-flags.ts
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json
├── package-lock.json
├── package.json
├── plugin.xml
├── src
├── android
│ ├── AckDatabase.java
│ ├── FileTransferBackground.java
│ ├── ProgressRequestBody.java
│ ├── UploadEvent.java
│ ├── UploadEventDao.java
│ ├── UploadForegroundNotification.java
│ ├── UploadNotification.java
│ ├── UploadTask.java
│ ├── config.gradle
│ └── res
│ │ └── ic_upload.png
└── ios
│ ├── FileTransferBackground.h
│ ├── FileTransferBackground.m
│ ├── FileUploader.h
│ ├── FileUploader.m
│ ├── UploadEvent.h
│ └── UploadEvent.m
├── tests
├── package.json
├── plugin.xml
├── test-server
│ ├── .gitignore
│ ├── app.js
│ ├── package-lock.json
│ └── package.json
├── test-utils.js
├── tests.js
├── travis.sh
├── tree.jpg
├── tree2.jpg
└── tree3.jpg
└── www
└── FileTransferManager.js
/.github/workflows/npmpublish.yml:
--------------------------------------------------------------------------------
1 | name: Node.js Package
2 | on: push
3 | jobs:
4 | publish:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - uses: actions/checkout@v2
8 | - uses: bahmutov/npm-install@v1
9 | - id: publish
10 | uses: JS-DevTools/npm-publish@v1
11 | with:
12 | token: ${{ secrets.npm_token }}
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #If ignorance is bliss, then somebody knock the smile off my face
2 |
3 | *.csproj.user
4 | *.suo
5 | *.cache
6 | Thumbs.db
7 | *.DS_Store
8 |
9 | *.bak
10 | *.cache
11 | *.log
12 | *.swp
13 | *.user
14 | *.vscode
15 |
16 | node_modules
17 | demo/node_modules
18 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | coffeelint.json
2 | index.html
3 | src/demo*
4 | src/index*
5 | webpack.config.js
6 | dist/demo*
7 | .git*
8 | .npmignore
9 | node_modules
10 | demo/node_modules
11 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | matrix:
3 | include:
4 | - os: osx
5 | language: objective-c
6 | osx_image: xcode10.1
7 | cache:
8 | bundler: true
9 | cocoapods: true
10 | - os: linux
11 | jdk: oraclejdk8
12 | language: android
13 | android:
14 | components:
15 | - tools
16 | - platform-tools
17 | - tools
18 | - build-tools-28.0.3
19 | - android-22
20 | - android-28
21 | - sys-img-armeabi-v7a-android-22
22 | licenses:
23 | - 'android-sdk-preview-license-.+'
24 | - 'android-sdk-license-.+'
25 | - 'google-gdk-license-.+'
26 | script:
27 | - nvm use
28 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm use 2.5.1 --install; fi
29 | - /bin/bash tests/travis.sh
30 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [4.1.2](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.1.1...4.1.2) (2024-11-05)
2 | * **android:** Return upload start and end time in upload response
3 | * **iOS:** Return upload start and end time in upload response
4 |
5 | ## [4.1.1](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.1.0...4.1.1) (2024-09-23)
6 | * **android:** Update cordova plugin file version to 8.1.0
7 | * **iOS:** Update cordova plugin file version to 8.1.0
8 |
9 | ## [4.1.0](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.10...4.1.0) (2024-04-30)
10 | * **android:** REVERTED Add Workers based on the number of parallelUploadsLimit and use a database to continue taking pending uploads in the Workers
11 | * **iOS:** Removed framework tag for pods
12 |
13 | ## [4.0.10](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.9...4.0.10) (2023-03-09)
14 | * **android:** Add Workers based on the number of parallelUploadsLimit and use a database to continue taking pending uploads in the Workers
15 |
16 | ## [4.0.9](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.8...4.0.9) (2023-02-21)
17 | * **android:** Upgrade WorkManager(2.8.0), Room(2.5.0) and Room Compiler(2.5.0)
18 |
19 | ## [4.0.8](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.7...4.0.8) (2023-01-20)
20 | * **android:** Add support for .db extension when assigning MediaType
21 |
22 | ## [4.0.7](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.6...4.0.7) (2022-11-15)
23 | * **android:** Compatibility with cordova-android v11
24 |
25 | ## [4.0.6](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.5...4.0.6) (2022-03-29)
26 | * **android:** Fix FilePath if there is a local webserver running on device
27 | * **ios:** Fix FilePath if there is a local webserver running on device
28 |
29 | ## [4.0.5](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.4...4.0.5) (2022-03-29)
30 | * **android:** Use multipart/form-data attribute as on iOS
31 |
32 | ## [4.0.4](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.3...4.0.4) (2022-03-29)
33 | * **android:** Add support for devices that does not support JSON as Content-Type
34 |
35 | ## [4.0.3](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.2...4.0.3) (2022-03-28)
36 | * **android:** Use cordova.getThreadPool() for execute Method
37 |
38 | ## [4.0.2](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.0...4.0.2) (2022-03-24)
39 | * **android:** Used ScheduledExecutorService and OutofQuotaPolicy added for Android 12 and above
40 |
41 | ## [4.0.1](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/4.0.0...4.0.1) (2022-03-04)
42 | * **android:** Fixed number of Threads for Executor Service and update Room
43 |
44 | ## [4.0.0](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/2.0.7...4.0.0) (2022-03-04)
45 | * **android:** Added WorkManager to handle uploads
46 |
47 | ## [2.0.5](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/2.0.4...2.0.5) (2021-07-07)
48 | * **android:** update demo project
49 |
50 | ## [2.0.4](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/2.0.3...2.0.4) (2021-06-18)
51 | ### Bug Fixes
52 | * **android:** Null pointer exception on manager service destroy
53 |
54 |
55 | ## [2.0.3](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/2.0.2...2.0.3) (2021-05-03)
56 |
57 | ## [3.0.2](https://github.com/spoonconsulting/cordova-plugin-background-upload/compare/3.0.1...3.0.2) (2021-04-22)
58 | ### Bug Fixes
59 | * **android:** Move gotev initialisation to a separate class that so it is initialised at app startup as per the android upload wiki (gotev)
60 |
61 |
62 | ## [2.0.1](https://github.com/spoonconsulting/cordova-plugin-background-upload/releases/tag/2.0.3)
63 | * **android:** Http Request method null for pendingUploads. setMethod(requestMethod) was null thus raising Java NullPointerException
64 |
65 |
66 | ## [3.0.1](https://github.com/spoonconsulting/cordova-plugin-background-upload)
67 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # cordova-plugin-background-upload
3 | This plugin provides a file upload functionality that can continue to run even while the app is in background. It includes progress updates suitable for long-term transfer operations of large files.
4 |
5 | [](https://badge.fury.io/js/@spoonconsulting%2Fcordova-plugin-background-upload)
6 | [](https://travis-ci.org/spoonconsulting/cordova-plugin-background-upload)
7 |
8 | **Supported Platforms**
9 | - iOS
10 | - Android
11 |
12 |
13 | **Installation**
14 |
15 | To install the plugin:
16 |
17 | ```
18 | cordova plugin add @spoonconsulting/cordova-plugin-background-upload --save
19 | ```
20 |
21 | To uninstall this plugin:
22 | ```
23 | cordova plugin rm @spoonconsulting/cordova-plugin-background-upload
24 | ```
25 |
26 | **Sample usage**
27 |
28 | The plugin needs to be initialised before any upload. Ideally this should be called on application start. The uploader will provide global events which can be used to check the progress of the uploads. By default, the maximum number of parallel uploads allowed is set to 1. You can override it by changing the configuration on init.
29 | ```javascript
30 | declare var FileTransferManager: any;
31 | var config = {};
32 | var uploader = FileTransferManager.init(config, callback);
33 | ```
34 |
35 | **Methods**
36 |
37 | ### uploader.init(config, callback)
38 | Initialises the uploader with provided configuration. To control the number of parallel uploads, pass `parallelUploadsLimit` in config.
39 | The callback is used to track progress of the uploads
40 | `var uploader = FileTransferManager.init({parallelUploadsLimit: 2}, event => {});`
41 |
42 | ### uploader.startUpload(payload)
43 | Adds an upload. In case the plugin was not able to enqueue the upload, an error will be emitted in the global event listener.
44 | ```javascript
45 | var payload = {
46 | id: "c3a4b4c7-4f1e-4c69-a951-773602e269fb",
47 | filePath: "/storage/emulated/0/Download/Heli.divx",
48 | fileKey: "file",
49 | serverUrl: "http://requestb.in/14cizzj1",
50 | notificationTitle: "Uploading images",
51 | headers: {
52 | api_key: "asdasdwere123sad"
53 | },
54 | parameters: {
55 | signature: "a_signature_hash",
56 | timestamp: 112321321
57 | }
58 | };
59 | uploader.startUpload(payload);
60 | ```
61 | Param | Description
62 | -------- | -------
63 | id | a unique id of the file (UUID string)
64 | filePath | the absolute path for the file to upload
65 | fileKey | the name of the key to use for the file
66 | serverUrl | remote server url
67 | headers | custom http headers
68 | parameters | custom parameters for multipart data
69 | notificationTitle | Notification title when file is being uploaded (Android only)
70 |
71 |
72 | ### uploader.removeUpload(uploadId, successCallback, errorCallback)
73 | Cancels and removes an upload
74 | ```javascript
75 | uploader.removeUpload(uploadId, function () {
76 | //upload aborted
77 | }, function (err) {
78 | //could not abort the upload
79 | });
80 | ```
81 |
82 |
83 | ### uploader.acknowledgeEvent(eventId)
84 | Confirms event received and remove it from plugin cache
85 | ```javascript
86 | uploader.acknowledgeEvent(eventId);
87 | ```
88 |
89 |
90 | The uploader will provide global events which can be used to check the status of the uploads.
91 | ```javascript
92 | FileTransferManager.init({}, function (event) {
93 | if (event.state == 'UPLOADED') {
94 | console.log("upload: " + event.id + " has been completed successfully");
95 | console.log(event.statusCode, event.serverResponse);
96 | } else if (event.state == 'FAILED') {
97 | if (event.id) {
98 | console.log("upload: " + event.id + " has failed");
99 | } else {
100 | console.error("uploader caught an error: " + event.error);
101 | }
102 | } else if (event.state == 'UPLOADING') {
103 | console.log("uploading: " + event.id + " progress: " + event.progress + "%");
104 | }
105 | });
106 |
107 | ```
108 |
109 | To prevent any event loss while transitioning between native and Javascript side, the plugin stores success/failure events on disk. Once you have received the event, you will need to acknowledge it else it will be broadcast again when the plugin is initialised. Progress events do not have eventId and are not persisted.
110 | ```javascript
111 | if (event.eventId) {
112 | uploader.acknowledgeEvent(event.eventId, function(){
113 | //success
114 | }, function (error){
115 | //error
116 | });
117 | }
118 | ```
119 | An event has the following attributes:
120 |
121 | Property | Comment
122 | -------- | -------
123 | id | id of the upload
124 | state | state of the upload (either `UPLOADING`, `UPLOADED` or `FAILED`)
125 | statusCode | response code returned by server after upload is completed
126 | serverResponse | server response received after upload is completed
127 | error | error message in case of failure
128 | errorCode | error code for any exception encountered
129 | progress | progress for ongoing upload
130 | eventId | id of the event
131 |
132 |
133 | ## iOS
134 | The plugin runs on ios 10.0 and above and internally uses [AFNetworking](https://github.com/AFNetworking/AFNetworking). AFNetworking uses [NSURLSession](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/URLLoadingSystem/Articles/UsingNSURLSession.html#//apple_ref/doc/uid/TP40013509-SW44) under the hood to perform the upload in a background session. When an upload is initiated, it will continue until it has been completed successfully or until the user kills the application. If the application is terminated by the OS, the uploads will still continue. When the user relaunches the application, after calling the init method, events will be emitted with the ids of these uploads. If the user kills the application by swiping it up from the multitasking pane, the uploads will not be continued. Upload tasks in background sessions are automatically retried by the URL loading system after network errors as decided by the OS.
135 |
136 | ## Android
137 | The minimum API level required is 21(Android 5) and the background file upload is handled by the WorkMananger library. If you have configured a notification to appear in the notifications area, the uploads will continue even if the user kills the app manually. If an upload is added when there is no network connection, it will be retried as soon as the network becomes reachable unless the app has already been killed.
138 |
139 | On Android 12 and above, there are strict limitations on background services that does not allow to start a Foreground Service when the app is processing in background(https://developer.android.com/guide/components/foreground-services). Hence to prevent this on Android 12 and above, we have a classic notification. On Android 11 and below, we are still using foreground service along with WorkManager to start the notification.
140 |
141 | ## Migration notes for v2.0
142 | - When v2 of the plugin is launched on an app containing uploads still in progress from v1 version, it will mark all of them as `FAILED` with `errorCode` 500 so that they can be retried.
143 | - If an upload is cancelled, an event with status `FAILED` and error code `-999` will be broadcasted in the global callback. It is up to the application to properly handle cancelled callbacks.
144 | - v2 removes the events `success`, `error`, `progress` and instead uses a single callback for all events delivery:
145 | ```javascript
146 | uploader.on('event', function (event) {
147 | //use event.state to handle different scenarios
148 | });
149 | ```
150 | - Events need to be acknowledged to be removed. Failure to do so will result in all saved events being broadcast on `init`.
151 | -`showNotification` parameter has been removed (A notification will always be shown on Android during upload)
152 |
153 |
154 | ## README for v1.0
155 | The README for the previous version can be found [here](https://github.com/spoonconsulting/cordova-plugin-background-upload/blob/eacce4385ae497188307a9944c2f353571a463a2/README.md).
156 |
157 | ## License
158 | cordova-plugin-background-upload is licensed under the Apache v2 License.
159 |
160 | ## Credits
161 | cordova-plugin-background-upload is brought to you by [Spoon Consulting Ltd] (http://www.spoonconsulting.com/).
162 |
--------------------------------------------------------------------------------
/demo/.browserslistrc:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # For the full list of supported browsers by the Angular framework, please see:
6 | # https://angular.io/guide/browser-support
7 |
8 | # You can see what browsers were selected by your queries by running:
9 | # npx browserslist
10 |
11 | last 1 Chrome version
12 | last 1 Firefox version
13 | last 2 Edge major versions
14 | last 2 Safari major versions
15 | last 2 iOS major versions
16 | Firefox ESR
17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
18 |
--------------------------------------------------------------------------------
/demo/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.ts]
12 | quote_type = single
13 |
14 | [*.md]
15 | max_line_length = off
16 | trim_trailing_whitespace = false
17 |
--------------------------------------------------------------------------------
/demo/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": ["projects/**/*"],
4 | "overrides": [
5 | {
6 | "files": ["*.ts"],
7 | "parserOptions": {
8 | "project": ["tsconfig.json", "e2e/tsconfig.json"],
9 | "createDefaultProgram": true
10 | },
11 | "extends": [
12 | "plugin:@angular-eslint/ng-cli-compat",
13 | "plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
14 | "plugin:@angular-eslint/template/process-inline-templates"
15 | ],
16 | "rules": {
17 | "@angular-eslint/component-class-suffix": [
18 | "error",
19 | {
20 | "suffixes": ["Page", "Component"]
21 | }
22 | ],
23 | "@angular-eslint/component-selector": [
24 | "error",
25 | {
26 | "type": "element",
27 | "prefix": "app",
28 | "style": "kebab-case"
29 | }
30 | ],
31 | "@angular-eslint/directive-selector": [
32 | "error",
33 | {
34 | "type": "attribute",
35 | "prefix": "app",
36 | "style": "camelCase"
37 | }
38 | ]
39 | }
40 | },
41 | {
42 | "files": ["*.html"],
43 | "extends": ["plugin:@angular-eslint/template/recommended"],
44 | "rules": {}
45 | }
46 | ]
47 | }
48 |
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | .tmp
7 | *.tmp
8 | *.tmp.*
9 | *.sublime-project
10 | *.sublime-workspace
11 | .DS_Store
12 | Thumbs.db
13 | UserInterfaceState.xcuserstate
14 | $RECYCLE.BIN/
15 |
16 | *.log
17 | log.txt
18 | npm-debug.log*
19 |
20 | /.idea
21 | /.angular
22 | /.ionic
23 | /.sass-cache
24 | /.sourcemaps
25 | /.versions
26 | /.vscode
27 | /coverage
28 | /dist
29 | /node_modules
30 | /platforms
31 | /plugins
32 | /www
33 |
--------------------------------------------------------------------------------
/demo/.npmignore:
--------------------------------------------------------------------------------
1 | ./demo
2 | ./demo-new
3 |
--------------------------------------------------------------------------------
/demo/README.md:
--------------------------------------------------------------------------------
1 | # Upload Demo
2 |
3 | Upload Demo is a sample using cordova-plugin-background-upload plugin
4 |
5 | ## Getting started
6 |
7 | Install dependencies
8 | ```bash
9 | npm i
10 | ```
11 |
12 | Add platform and run on Android
13 | ```bash
14 | ionic cordova platform add android
15 | ionic cordova run android
16 | ```
17 | Add platform and run on iOS
18 |
19 | ```bash
20 | ionic cordova platform add ios
21 | ionic cordova run ios
22 | ```
23 |
24 | ## License
25 |
26 | Upload Demo is licensed under the Apache v2 License.
27 |
--------------------------------------------------------------------------------
/demo/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "defaultProject": "app",
5 | "newProjectRoot": "projects",
6 | "projects": {
7 | "app": {
8 | "root": "",
9 | "sourceRoot": "src",
10 | "projectType": "application",
11 | "prefix": "app",
12 | "schematics": {},
13 | "architect": {
14 | "build": {
15 | "builder": "@angular-devkit/build-angular:browser",
16 | "options": {
17 | "outputPath": "www",
18 | "index": "src/index.html",
19 | "main": "src/main.ts",
20 | "polyfills": "src/polyfills.ts",
21 | "tsConfig": "tsconfig.app.json",
22 | "assets": [
23 | {
24 | "glob": "**/*",
25 | "input": "src/assets",
26 | "output": "assets"
27 | },
28 | {
29 | "glob": "**/*.svg",
30 | "input": "node_modules/ionicons/dist/ionicons/svg",
31 | "output": "./svg"
32 | }
33 | ],
34 | "styles": ["src/theme/variables.scss", "src/global.scss"],
35 | "scripts": [],
36 | "aot": false,
37 | "vendorChunk": true,
38 | "extractLicenses": false,
39 | "buildOptimizer": false,
40 | "sourceMap": true,
41 | "optimization": false,
42 | "namedChunks": true
43 | },
44 | "configurations": {
45 | "production": {
46 | "fileReplacements": [
47 | {
48 | "replace": "src/environments/environment.ts",
49 | "with": "src/environments/environment.prod.ts"
50 | }
51 | ],
52 | "optimization": true,
53 | "outputHashing": "all",
54 | "sourceMap": false,
55 | "namedChunks": false,
56 | "aot": true,
57 | "extractLicenses": true,
58 | "vendorChunk": false,
59 | "buildOptimizer": true,
60 | "budgets": [
61 | {
62 | "type": "initial",
63 | "maximumWarning": "2mb",
64 | "maximumError": "5mb"
65 | }
66 | ]
67 | },
68 | "ci": {
69 | "progress": false
70 | }
71 | }
72 | },
73 | "serve": {
74 | "builder": "@angular-devkit/build-angular:dev-server",
75 | "options": {
76 | "browserTarget": "app:build"
77 | },
78 | "configurations": {
79 | "production": {
80 | "browserTarget": "app:build:production"
81 | },
82 | "ci": {
83 | "progress": false
84 | }
85 | }
86 | },
87 | "extract-i18n": {
88 | "builder": "@angular-devkit/build-angular:extract-i18n",
89 | "options": {
90 | "browserTarget": "app:build"
91 | }
92 | },
93 | "lint": {
94 | "builder": "@angular-eslint/builder:lint",
95 | "options": {
96 | "lintFilePatterns": [
97 | "src/**/*.ts",
98 | "src/**/*.html"
99 | ]
100 | }
101 | },
102 | "e2e": {
103 | "builder": "@angular-devkit/build-angular:protractor",
104 | "options": {
105 | "protractorConfig": "e2e/protractor.conf.js",
106 | "devServerTarget": "app:serve"
107 | },
108 | "configurations": {
109 | "production": {
110 | "devServerTarget": "app:serve:production"
111 | },
112 | "ci": {
113 | "devServerTarget": "app:serve:ci"
114 | }
115 | }
116 | },
117 | "ionic-cordova-build": {
118 | "builder": "@ionic/cordova-builders:cordova-build",
119 | "options": {
120 | "browserTarget": "app:build"
121 | },
122 | "configurations": {
123 | "production": {
124 | "browserTarget": "app:build:production"
125 | }
126 | }
127 | },
128 | "ionic-cordova-serve": {
129 | "builder": "@ionic/cordova-builders:cordova-serve",
130 | "options": {
131 | "cordovaBuildTarget": "app:ionic-cordova-build",
132 | "devServerTarget": "app:serve"
133 | },
134 | "configurations": {
135 | "production": {
136 | "cordovaBuildTarget": "app:ionic-cordova-build:production",
137 | "devServerTarget": "app:serve:production"
138 | }
139 | }
140 | }
141 | }
142 | }
143 | },
144 | "cli": {
145 | "analytics": false,
146 | "defaultCollection": "@ionic/angular-toolkit"
147 | },
148 | "schematics": {
149 | "@ionic/angular-toolkit:component": {
150 | "styleext": "scss"
151 | },
152 | "@ionic/angular-toolkit:page": {
153 | "styleext": "scss"
154 | }
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/demo/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Upload Demo
4 | An awesome Ionic/Cordova app.
5 | Ionic Framework Team
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/demo/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo-new",
3 | "integrations": {
4 | "cordova": {}
5 | },
6 | "type": "angular"
7 | }
8 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "0.0.2",
4 | "author": "Ionic Framework",
5 | "homepage": "https://ionicframework.com/",
6 | "scripts": {
7 | "ng": "ng",
8 | "start": "ng serve",
9 | "build": "ng build",
10 | "test": "ng test",
11 | "lint": "ng lint",
12 | "e2e": "ng e2e"
13 | },
14 | "private": true,
15 | "dependencies": {
16 | "@angular/common": "~14.2.2",
17 | "@angular/core": "~14.2.2",
18 | "@angular/forms": "~14.2.2",
19 | "@angular/platform-browser": "~14.2.2",
20 | "@angular/platform-browser-dynamic": "~14.2.2",
21 | "@angular/router": "~14.2.2",
22 | "@awesome-cordova-plugins/background-upload": "^5.45.0",
23 | "@awesome-cordova-plugins/core": "^5.45.0",
24 | "@awesome-cordova-plugins/file": "^5.45.0",
25 | "@awesome-cordova-plugins/image-picker": "^5.45.0",
26 | "@ionic/angular": "^6.2.5",
27 | "cordova-ios": "6.2.0",
28 | "rxjs": "~7.5.6",
29 | "tslib": "^2.4.0",
30 | "zone.js": "~0.11.8"
31 | },
32 | "devDependencies": {
33 | "@angular-devkit/build-angular": "~14.2.3",
34 | "@angular-eslint/builder": "~14.0.4",
35 | "@angular-eslint/eslint-plugin": "~14.0.4",
36 | "@angular-eslint/eslint-plugin-template": "~14.0.4",
37 | "@angular-eslint/template-parser": "~14.0.4",
38 | "@angular/cli": "~14.2.3",
39 | "@angular/compiler": "~14.2.2",
40 | "@angular/compiler-cli": "~14.2.2",
41 | "@angular/language-service": "~14.2.2",
42 | "@ionic/angular-toolkit": "^7.0.0",
43 | "@ionic/cordova-builders": "^7.0.0",
44 | "@spoonconsulting/cordova-plugin-background-upload": "git+https://github.com/spoonconsulting/cordova-plugin-background-upload.git#master",
45 | "@spoonconsulting/cordova-plugin-telerik-imagepicker": "^2.0.1",
46 | "@types/node": "^12.11.1",
47 | "@typescript-eslint/eslint-plugin": "5.37.0",
48 | "@typescript-eslint/parser": "5.37.0",
49 | "ajv": "8.8.2",
50 | "cordova-android": "^11.0.0",
51 | "cordova-plugin-device": "2.1.0",
52 | "cordova-plugin-file": "8.1.0",
53 | "cordova-plugin-ionic-keyboard": "^2.2.0",
54 | "cordova-plugin-ionic-webview": "^5.0.0",
55 | "cordova-plugin-statusbar": "3.0.0",
56 | "cordova-res": "^0.15.4",
57 | "eslint": "^8.23.1",
58 | "eslint-plugin-import": "2.26.0",
59 | "eslint-plugin-jsdoc": "39.3.6",
60 | "eslint-plugin-prefer-arrow": "1.2.3",
61 | "native-run": "^1.7.0",
62 | "ts-node": "~10.9.1",
63 | "typescript": "~4.8.2"
64 | },
65 | "description": "An Ionic project",
66 | "cordova": {
67 | "plugins": {
68 | "cordova-plugin-statusbar": {},
69 | "cordova-plugin-device": {},
70 | "cordova-plugin-ionic-webview": {
71 | "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
72 | },
73 | "cordova-plugin-ionic-keyboard": {},
74 | "cordova-plugin-file": {
75 | "ANDROIDX_WEBKIT_VERSION": "1.4.0"
76 | },
77 | "@spoonconsulting/cordova-plugin-telerik-imagepicker": {},
78 | "@spoonconsulting/cordova-plugin-background-upload": {}
79 | },
80 | "platforms": [
81 | "android",
82 | "ios"
83 | ]
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/demo/resources/README.md:
--------------------------------------------------------------------------------
1 | These are Cordova resources. You can replace icon.png and splash.png and run
2 | `ionic cordova resources` to generate custom icons and splash screens for your
3 | app. See `ionic cordova resources --help` for details.
4 |
5 | Cordova reference documentation:
6 |
7 | - Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8 | - Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
9 |
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-hdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-hdpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-ldpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-ldpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-mdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-mdpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-xhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-xhdpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-xxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-xxhdpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/icon/drawable-xxxhdpi-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/icon/drawable-xxxhdpi-icon.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-hdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-ldpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-mdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-xhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-xxhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-land-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-land-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-hdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-hdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-ldpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-ldpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-mdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-mdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-xhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-xhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-xxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-xxhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/splash/drawable-port-xxxhdpi-screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/android/splash/drawable-port-xxxhdpi-screen.png
--------------------------------------------------------------------------------
/demo/resources/android/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | localhost
5 |
6 |
7 |
--------------------------------------------------------------------------------
/demo/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/icon.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-1024.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-108@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-108@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-20.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-20@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-20@3x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-24@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-24@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-27.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-27.5@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-29.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-40.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-44@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-44@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-50.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-50@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-60.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-72.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-72@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-76.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-86@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-86@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-98@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-98@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-small.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-small@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon-small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon-small@3x.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon.png
--------------------------------------------------------------------------------
/demo/resources/ios/icon/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/icon/icon@2x.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-1792h~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-1792h~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-2436h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-2436h.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-2688h~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-2688h~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-667h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-667h.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-736h.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape-1792h~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape-1792h~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape-2436h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape-2436h.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape-2688h~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape-2688h~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape-736h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape-736h.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape@~ipadpro.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Portrait@~ipadpro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Portrait@~ipadpro.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default@2x~universal~anyany.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default@2x~universal~anyany.png
--------------------------------------------------------------------------------
/demo/resources/ios/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/ios/splash/Default~iphone.png
--------------------------------------------------------------------------------
/demo/resources/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/resources/splash.png
--------------------------------------------------------------------------------
/demo/src/app/app-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | {
6 | path: '',
7 | loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
8 | }
9 | ];
10 | @NgModule({
11 | imports: [
12 | RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
13 | ],
14 | exports: [RouterModule]
15 | })
16 | export class AppRoutingModule {}
17 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spoonconsulting/cordova-plugin-background-upload/774e330176cc9b922c646ee06e312b94948b781a/demo/src/app/app.component.scss
--------------------------------------------------------------------------------
/demo/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2 | import { TestBed, waitForAsync } from '@angular/core/testing';
3 |
4 | import { AppComponent } from './app.component';
5 |
6 | describe('AppComponent', () => {
7 |
8 | beforeEach(waitForAsync(() => {
9 |
10 | TestBed.configureTestingModule({
11 | declarations: [AppComponent],
12 | schemas: [CUSTOM_ELEMENTS_SCHEMA],
13 | }).compileComponents();
14 | }));
15 |
16 | it('should create the app', () => {
17 | const fixture = TestBed.createComponent(AppComponent);
18 | const app = fixture.debugElement.componentInstance;
19 | expect(app).toBeTruthy();
20 | });
21 | // TODO: add more tests!
22 |
23 | });
24 |
--------------------------------------------------------------------------------
/demo/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 |
4 |
5 | @Component({
6 | selector: 'app-root',
7 | templateUrl: 'app.component.html',
8 | styleUrls: ['app.component.scss'],
9 | })
10 | export class AppComponent {
11 | constructor() {}
12 | }
13 |
--------------------------------------------------------------------------------
/demo/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { BrowserModule } from '@angular/platform-browser';
3 | import { RouteReuseStrategy } from '@angular/router';
4 |
5 | import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
6 |
7 | import { AppRoutingModule } from './app-routing.module';
8 | import { AppComponent } from './app.component';
9 |
10 | @NgModule({
11 | declarations: [AppComponent],
12 | entryComponents: [],
13 | imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
14 | providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
15 | bootstrap: [AppComponent],
16 | })
17 | export class AppModule {}
18 |
--------------------------------------------------------------------------------
/demo/src/app/explore-container/explore-container.component.html:
--------------------------------------------------------------------------------
1 |