private File pdf = null;
private final String PDF_PATH = "/sdcard/download/B.pdf";
private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.pdf);
pdf = new File(PDF_PATH);
if(pdf.exists() && pdf.isFile() && pdf.canRead()){
intent = new Intent(Intent.ACTION_DEFAULT);
intent.setType("application/pdf");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(Environment.getExternalStorageDirectory() + PDF_PATH));
startActivity(intent);
}
}
comments powered by Disqus
Subscribe to this blog via RSS.
LazyColumn/Row에서 동일한 Key를 사용하면 크래시가 발생하는 이유
Posted on 30 Nov 2024