I work with Android and I want to open PDF file:
- from URL
- from Internal storage.(where put my file to Android read it?)
Can somebody help me?
Assuming there is a PDF viewer application installed on the device
To open the PDF in application use:
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
where file is the path of PDF File.