Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49215

File Transfer Download crashes ! Why?

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>