title: After download how to open downloaded file?
body: <pre><code>    DownloadManager.Request request = new DownloadManager.Request(uri);
        request.setDestinationInExternalPublicDir(Environment.
                          DIRECTORY_DOWNLOADS, nameOfFile)
  </code></pre>
  
  <p>To open it</p>
  
  <pre><code>       File file = new File(Environment.
                      DIRECTORY_DOWNLOADS, nameOfFile);
              MimeTypeMap map = MimeTypeMap.getSingleton();
              String ext = MimeTypeMap.getFileExtensionFromUrl(file.getName());
              String type = map.getMimeTypeFromExtension(ext);
  </code></pre>
  
  <p>But I am getting an error message that file cannot be accessed.Check the location</p>