https://github.com/kosso/nappnuker
Android Titanium module to disable resuming downloads by the NappDownloadManager
https://github.com/kosso/nappnuker
Last synced: 2 months ago
JSON representation
Android Titanium module to disable resuming downloads by the NappDownloadManager
- Host: GitHub
- URL: https://github.com/kosso/nappnuker
- Owner: kosso
- Created: 2017-03-07T12:05:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-12T11:37:06.000Z (over 8 years ago)
- Last Synced: 2025-02-14T01:18:55.392Z (4 months ago)
- Language: Java
- Size: 77.1 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NappNuker
### UPDATE
[Updated and modified versions of NappDownloadManger for iOS and Android](https://github.com/kosso/NappDownloadManager-mod) have been created with a `cleanUp()` method which contains similar features to this module.
*Please use the new modified full version of the downloader.*
-----------
An Android Titanium module to nuke any leftover files and queue data after an aborted download queue from the [Android version of the NappDownloadManager](https://github.com/viezel/NappDownloadManager).
NB: ***This will disable the ability to resume downloads on the next launch of the app***. (Many of us do not need this ability since it can complicate things a great deal!)
(For some reason I can't get a patched fork to build in Studio, so I created this extra module to do the job!)
The compiled module zip is in the /dist folder.
#### Usage
**BEFORE** loading the main NappDownloadmanager module… Preferably in app.js
```
if(Titanium.Platform.osname==='android'){
var nappnuker = require('com.kosso.nappnuker');
nappnuker.nukeNappDownloaderData();
nappnuker = null;
}
```That's it.
An [iOS version of the NappDownloadmanager](https://github.com/kosso/NappDownloadManager/tree/nuke-at-launch) [`nuke-at-launch` branch] has been patched with this built-in. i.e.: No resuming downloads. The iOS version will also clean up any partially/failed downloads caused by a crash/exit during a download queue.
I might update this module to do the same. (ie: Read the data file queues and delete the incomplete files before trashing the data file itself.)
-----------
@kosso 2017