1

I am trying to open a PDF file via Intent and it works fine but the only problem is that the original file is not opened instead a cached version is opened. I want to open the original file.
My Code:

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(downloadmanager.getUriForDownloadedFile(referenceId), "application/pdf");
Intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
Intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);  
Allan Pereira
  • 2,572
  • 4
  • 21
  • 28
Raaf003
  • 103
  • 1
  • 7

0 Answers0