Programming/Android Android file view 생각하는로뎅 2013. 4. 10. 22:51 반응형 String path = Environment.getExternalStorageDirectory() .getAbsolutePath() + "/StopWatch_jinisoftware"; File file = new File(path + "/abc.txt"); MimeTypeMap map = MimeTypeMap.getSingleton(); String ext = MimeTypeMap.getFileExtensionFromUrl(file.getName()); String type = map.getMimeTypeFromExtension(ext); if (type == null) type = "*/*"; Intent intent = new Intent(Intent.ACTION_VIEW); Uri data = Uri.fromFile(file); intent.setDataAndType(data, type); startActivity(intent); 반응형