Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 126.96.36.199 release ready!
Owner and Founder. Opencart
Downloading an audio file from a URL is a very common process and most of the app have this functionality. It is really simple to download an audio from a URL and for that, you need to create an object of DownloadManager and enqueue the DownloadManager.Request object into it.
As you can see in the above code segment a download service is taken and an object of DownloadManager.Request is created with the file URI. You can use the setTitle and setDescription function to the title and description respectively which will be displayed when the notification bar is expanded.
function setDestinationInExternalPublicDir is used to set the destination of the file in the external memory. Environment.DIRECTORY_DOWNLOADS defines that the file will be stored in the downloads directory.
After creating the request all you need to do is use the enqueue function of the DownloadManager to start the download.
Thank you very much, this is Vedesh Kumar signing off.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Owner, Shop ATV Escape
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.