안드로이드 개발 질문/답변
(글 수 45,052)
1. 프로그램에 포함된 그림을 인텐트로 연결하고 싶습니다.(Viewer 연결)
아무리 찾아도 sdcard에 있는 파일을 인텐트로 연결하는 것만 나오더라구요.
그러다가 아래와 같은 소스를 찾았는데.. 에러가 발생됩니다.
어떤식으로 인텐트를 연결해야 하나요?
## 소스
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("android.resource://com.test.hello/" + R.drawable.a001);
intent.setDataAndType( uri, "image/jpeg");
startActivity(intent);
} catch(Exception e) {
Log.d("err", e.getMessage());
}
## 에러
intent : No Activity found to handle Intent { act=android.intent.action.VIEW dat=android.resource://com.....
2. 이미지를 SMS에 첨부하려면 어떤식으로 할 수 있나요?
또는 이미지를 트위터,페이스북,gmail,picasa,이메일 등으로 연결하고 싶은데.. 어떤식으로 할 수 있나요?