파일탐색기 만드는데
파일선택시 인텐트 날리는데서 자꾸 앱이 죽습니다
apk 파일선택시
File apkFile = new File(nPath + mSelFilename);
//File apkFile = new File(nPath + item.getname());
errorDlg.setMessage(nPath + mSelFilename + "::" + nPath + item.getname()).show();
Intent intent3 = new Intent(Intent.ACTION_VIEW);
intent3.setDataAndType(Uri.fromFile(apkFile), "application/vnd.android.package-archive");
mCtx.startActivity(intent3);
pdf파일선택시
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setDataAndType(Uri.fromFile(file), "application/pdf");
mCtx.startActivity(intent);
위의코드만 실행하면 앱이 죽습니다
왜 그런걸까요?
아시는분 조언부탁합니다