Created
September 22, 2010 08:47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File sd = new File(Environment.getExternalStorageDirectory() + File.separator + PDFFolder + File.separator + model.get(idx)); | |
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.fromFile(sd)); | |
intent.setDataAndType(Uri.fromFile(sd), "application/pdf"); | |
try { | |
getContext().startActivity(intent); | |
}catch(ActivityNotFoundException e){ | |
//Show a message that PDF viewer is not installed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment