1
SDCard에 저장된 Android에서 PDF를 읽는 방법 ??안드로이드에서 PDF를 읽는 방법?
SDCard에 저장된 Android에서 PDF를 읽는 방법 ??안드로이드에서 PDF를 읽는 방법?
여기 읽을 PDF 파일을 여는 방법을 보여주는 몇 가지 코드를입니다 :
private void openBook() {
File file = new File(mRealPath);
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setDataAndType(path, getString(R.string.application_type));
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(FirstTab.this,
getString(R.string.no_application_found),
Toast.LENGTH_SHORT).show();
}
}