android Programming Glossary: example.pdf
How to open a PDF via Intent from SD card http://stackoverflow.com/questions/10530416/how-to-open-a-pdf-via-intent-from-sd-card an Intent . It still doesn't work. I think the problem is the Intent launching so I'm simply trying to open a file example.pdf that I copied onto the SD card using this code Log.w IR TRYING TO RENDER Environment.getExternalStorageDirectory .getAbsolutePath.. onto the SD card using this code Log.w IR TRYING TO RENDER Environment.getExternalStorageDirectory .getAbsolutePath example.pdf Intent intent new Intent Intent.ACTION_VIEW intent.setDataAndType Uri.parse Environment.getExternalStorageDirectory .getAbsolutePath.. new Intent Intent.ACTION_VIEW intent.setDataAndType Uri.parse Environment.getExternalStorageDirectory .getAbsolutePath example.pdf application pdf intent.setFlags Intent.FLAG_ACTIVITY_CLEAR_TOP try startActivity intent Log.e IR No exception catch ActivityNotFoundException..
How to render PDF in Android http://stackoverflow.com/questions/2883355/how-to-render-pdf-in-android button.setOnClickListener new View.OnClickListener @Override public void onClick View v File file new File sdcard example.pdf if file.exists Uri path Uri.fromFile file Intent intent new Intent Intent.ACTION_VIEW intent.setDataAndType path application..
|