![]() ![]() Long downloadReference = downloadManager.enqueue(request) Enqueue a new download and same the referenceId tDestinationInExternalFilesDir(this,Environment.DIRECTORY_DOWNLOADS,intent.getStringExtra("Document_title") + ".pdf") Set the local destination for the downloaded file to a path within the application's external files directory tTitle(intent.getStringExtra("Document_title")) Set the title of this download, to be displayed in notifications. Set whether this download may proceed over a roaming connection. Restrict the types of networks over which this download may proceed. Uri Download_Uri = Uri.parse(intent.getStringExtra("Document_href")) ÄownloadManager.Request request = new DownloadManager.Request(Download_Uri) How I download: Intent intent = getIntent() ÄownloadManager downloadManager = (DownloadManager)getSystemService(DOWNLOAD_SERVICE) But if the file is somewhat bigger how do I check if the download manager is finished with the download before opening it. The situation is I download a PDF file and open it, and usually the file is so small it complets before opening. ![]() But my question is how do i check if the download completed. ![]() It's the first time I'm working with it and have successfully downloaded multiple files and opened them. Small question about the download manager in android.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |