|
@@ -21,18 +21,26 @@ function actionViewIntent(path:string, mime:string = 'text/plain') {
|
21
|
21
|
if(Platform.OS === 'android')
|
22
|
22
|
return RNFetchBlob.actionViewIntent(path, mime)
|
23
|
23
|
else
|
24
|
|
- return Promise.reject('RNFetchBlob.actionViewIntent only supports Android.')
|
|
24
|
+ return Promise.reject('RNFetchBlob.android.actionViewIntent only supports Android.')
|
25
|
25
|
}
|
26
|
26
|
|
27
|
27
|
function getContentIntent(mime:string) {
|
28
|
28
|
if(Platform.OS === 'android')
|
29
|
29
|
return RNFetchBlob.getContentIntent(mime)
|
30
|
30
|
else
|
31
|
|
- return Promise.reject('RNFetchBlob.getContentIntent only supports Android.')
|
|
31
|
+ return Promise.reject('RNFetchBlob.android.getContentIntent only supports Android.')
|
|
32
|
+}
|
|
33
|
+
|
|
34
|
+function addCompleteDownload(config) {
|
|
35
|
+ if(Platform.OS === 'android')
|
|
36
|
+ return RNFetchBlob.addCompleteDownload(config)
|
|
37
|
+ else
|
|
38
|
+ return Promise.reject('RNFetchBlob.android.addCompleteDownload only supports Android.')
|
32
|
39
|
}
|
33
|
40
|
|
34
|
41
|
|
35
|
42
|
export default {
|
36
|
43
|
actionViewIntent,
|
37
|
|
- getContentIntent
|
|
44
|
+ getContentIntent,
|
|
45
|
+ addCompleteDownload
|
38
|
46
|
}
|