In my app I am creating a pdf file in internal app files(data/data/package/files) I want these files to be readable when I read them using this code:
Uri path = Uri.fromFile(pdfFile);
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
pdfIntent.setDataAndType(path, "application/pdf");
pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
I have read about using openOutputStream() method but I have no clue how to read them through this.Could anyone help me?
EDIT
pdfFile--
File directory=getFilesDir();
pdfFile=new File(directory,filename+".pdf");