Cordoba / Phone saver: run the FileTransfer plugin in the background thread

I saw an old unresolved question: Run PhoneGap FileTransfer in the background thread?

Is there any news on this topic?

I use Cordova 3.4.0 with the FileTransfer plugin, and when I upload the file, the user interface starts to lag far behind iOS devices, where the gif download freezes all the time

Is there an alternative plugin for downloading files smoothly?

+4
source share
1 answer

I just checked the release notes for file transfers. The problem was fixed in the latest build:

0.4.3 (April 17, 2014)

... CB-5175: [ios] CDVFileTransfer ( โ„– 24)...

, , , . . https://issues.apache.org/jira/browse/CB-6720?focusedCommentId=14008776&page=com.atlassian.jira.plugin.system. emetabpanels: comment-tabpanel # comment-14008776 .

CDVFileTransfer.m, .

[delegate.connection start];

// Downloads can take time
// sending this to a new thread calling the download_async method
dispatch_async(
               dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, (unsigned long)NULL),
               ^(void) { [delegate.connection start];}

, , , , .

+1

Source: https://habr.com/ru/post/1538092/


All Articles