You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,21 @@
1
1
## Changes
2
2
3
-
### 1.3.3
3
+
### 1.3.6
4
+
5
+
* Fixed bug [#77](https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/issues/77): [Android] Download are cancelled with no reason
6
+
7
+
### 1.3.5
8
+
9
+
**changes in documentation*
10
+
11
+
### 1.3.4
4
12
5
13
* Add possibility to prevent files from showing up in download manager
6
14
15
+
### 1.3.3
16
+
17
+
**no changes*
18
+
7
19
### 1.3.2
8
20
9
21
* Fixed bug [#69](https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/issues/69): Using PathNameForDownloadedFile: Android suffixes filename by '-1' if file already exists
As of iOS 9, your URL must be secured or you have to add the domain to the list of exceptions. See [https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14](https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html#//apple_ref/doc/uid/TP40016198-SW14)
38
38
39
39
### Start downloading
40
40
41
41
You can now start a download by adding the following code:
42
-
```
43
-
var downloadManager = CrossDownloadManager.Current;
44
-
var file = downloadManager.CreateDownloadFile(url);
45
-
downloadManager.Start(file);
42
+
```csharp
43
+
vardownloadManager=CrossDownloadManager.Current;
44
+
varfile=downloadManager.CreateDownloadFile(url);
45
+
downloadManager.Start(file);
46
46
```
47
47
48
48
This will add the file to a native library, which starts the download of that file. You can watch the properties of the `IDownloadFile` instance and execute some code if e.g. the status changes to `COMPLETED`, you can also watch the `IDownloadManager.Queue` and execute some code if the list of files, that will be downloaded or are currently downloading changes.
@@ -60,28 +60,28 @@ When you choose not to provide your own path before starting the download, the d
60
60
#### Recommended Option - Custom Location
61
61
62
62
Usually, you would expect to set the path to the `IDownloadFile` instance, you get when calling `downloadManager.CreateDownloadFile(url)`. But, as this download manager even continues downloading when the app crashed, you have to be able to reconstruct the path in every stage of the app. The correct way is to register a method as early as possible, that, in every circumstance, can reconstruct the path that the file should be saved. This method could look like following:
63
-
```
64
-
CrossDownloadManager.Current.PathNameForDownloadedFile = new System.Func<IDownloadFile, string> (file => {
**Warning:** Please check if the files exist. The CrossDownloadManager will overwrite the file if it already exists.
79
79
80
80
##### Additional for Andriod
81
81
82
82
On Android, the destination location must be a located outside of your Apps internal directory (see [#10](https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/issues/10) for details). To allow your app to write to that location, you either have to add the permission `WRITE_EXTERNAL_STORAGE` to the mainfest.xml file to require it when installing the app
I've created a quite basic implementation for UWP, iOS and Android which you can find [here](https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/tree/develop/Sample). Feel free to fork this repository and play around with it. It's right within the `Sample` folder.
100
102
101
103
### Why do the files show up in the native Android Download Manager?
102
104
103
-
That is the default behavior when downloading files using the Android DownladManager API. If you don't want this to happen you can change the property IsVisibleInDownloadsUi of the DownloadManagerImplementation
105
+
This is the default of the native download manager on Android. You can change this behavior by setting the property `IsVisibleInDownloadsUi` of the Android implementation of the download manager to `false`. Here's an example which you can copy into your Android application:
104
106
105
-
```
106
-
(CrossDownloadManager.Current as DownloadManagerImplementation).IsVisibleInDownloadsUi = false;
0 commit comments