I want to download in-app from server. When my device go to suspend during loading large file and after back to app I receive error from network and then I need start loading file from begin. What I must to do for
complete my download in suspend? [import]uid: 129134 topic_id: 31812 reply_id: 331812[/import]
Not sure if this is the answer, but look at this documentation page: http://docs.coronalabs.com/api/library/network/download.html
It says:
"You cannot execute a network download during a System Suspend/Exit event. After Corona suspends, no callbacks will fire.
You can work around this by saving the download request you wish to make to a file upon a System Suspend/Exit event. Then on a System Resume event, check if there is a pending request saved and if there is download it."
I haven’t done this just posting what I saw a few minutes ago [import]uid: 19620 topic_id: 31812 reply_id: 136612[/import]
Not sure if this is the answer, but look at this documentation page: http://docs.coronalabs.com/api/library/network/download.html
It says:
"You cannot execute a network download during a System Suspend/Exit event. After Corona suspends, no callbacks will fire.
You can work around this by saving the download request you wish to make to a file upon a System Suspend/Exit event. Then on a System Resume event, check if there is a pending request saved and if there is download it."
I haven’t done this just posting what I saw a few minutes ago [import]uid: 19620 topic_id: 31812 reply_id: 136612[/import]
You can also try keeping the device awake with system.setIdleTimer()
You can also try keeping the device awake with system.setIdleTimer()