I am using Download plugin on ionic 3 to natively download pdf file from an external source. Here is the code I am using.
var request = {
uri: item.url,
title: item.resource_title,
description: '',
mimeType: '',
visibleInDownloadsUi: false,
notificationVisibility: 1,
destinationInExternalFilesDir: {
dirType: 'Downloads',
subPath: 'MyFile.pdf'
},
destinationUri: 'this.file.externalRootDirectory + ‘/Download/’',
};
this.downloader.download(request)
.then((location: string) => console.log('File downloaded at:'+location))
.catch((error: any) => console.error(error));
In the above code “item.uri” is an external download link like onedrive.com/demo.pdf
Now the problem is that whenever a user downloads this file, he can see the source url (onedrive.com/demo.pdf) in the download manager.
I was thinking is there a way we can hide this source uri or show some dummy text in the download manager. I can see that other apps like google and skype do that.