@HarinderSingh wrote:
Where is problem??
I am calling it within app.component.ts. Also tried home.ts. Everytime crash app. There are 1200 pages and return json for every page. I have tried android:largeHeap=“true”getAllData() { let fileTransfer: FileTransferObject = this.transfer.create(); for (var i = 1; i < 1200; i++) { let url = encodeURI('Here is API URL' + i + '/G'); fileTransfer.download(url, this.file.dataDirectory + 'G' + i + '.json').then((entry) => { // Nothing comes here.... }, (error) => { // handle error }); } }
Posts: 1
Participants: 1