I’m engaged on a software that’s just like podcast the place person have plenty of audio classes to play and obtain. Some classes are an hour lengthy. When a person faucets on any session to play, lets name it downloadToPlay
, the community name to obtain it within the temp listing takes place. When person faucet on obtain icon, name it downloadToSave
the community name is made and saved within the doc listing. In brief, each require downloading the information and storing it into listing.
The Downside: some person will hit play button(downloadToPlay
) and can instantly transfer to background. The obtain will nonetheless occur as a result of I’ve background process operating. However that has time restrict of 30 second, so unhealthy community or big recordsdata downloads won’t be completed on this time interval inflicting the audio to by no means play.
Expectations: What my consumer desires to attain is when the person downloads to play and strikes into background, it ought to obtain it in background and play no matter community situations.
I’ve discovered this however the issue is in accordance with the hyperlink the background process can start when the system finds supreme scenario. I dont know if it may possibly occur instantly or not.
PS: Im utilizing Alamofire for community calls.
Can anybody inform me find out how to obtain the massive file downloads instantly
whereas background/foreground and play it when executed no matter community.
Thanks prematurely.