1

how to get pdf from internal storage in android Using WebView or AnyConcept. i have to get pdf in an activity from internal storage.Can anyone of u guys let me know about this .Thank You.

4

1 回答 1

0

String filename = null;
                File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +"/"+ filename);
                Intent target = new Intent(Intent.ACTION_VIEW);
                target.setDataAndType(Uri.fromFile(file),"application/pdf");
                target.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

                Intent intent = Intent.createChooser(target, "Open File");
startActivity(intent);

并给出pdf文件名

于 2017-03-22T05:27:53.050 回答