title: Check if Download Manager downloaded the file
body: <p>How can I check if file has been downloaded and run its installation? I have a code:</p>
  
  <pre><code>public void downloadUpdate(String url){
  
      DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
      request.setDescription("Downloading...");
      request.setTitle("App Update");
      request.allowScanningByMediaScanner();
      request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
  
      String name = URLUtil.guessFileName(url, null, MimeTypeMap.getFileExtensionFromUrl(url));
  
      request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, name);
  
      DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
      manager.enqueue(request);
  }
  </code></pre>