예를 들어 k9-Mail은 일부 첨부 파일을 처리 할 응용 프로그램을 찾으려고 시도하고 전자 메일의 MimeType-Specification을 사용합니다.전달 의도?
PDF로 예를 들어그것을 전송 정확한 (디버깅 정보) :
12-27 15:41:58.992: I/ActivityManager(119): Starting: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/3/VIEW typ=application/pdf flg=0x3880001 cmp=com.adobe.reader/.AdobeReader } from pid 119
그러나
메일은하지 MIME 타입 "응용 프로그램/PDF"로하지만, " '응용 프로그램/PDF'"는하지 않습니다와 함께 PDF를 첨부하는 경우 작업. .이 방송 결과 :-(: :-(12-27 15:35:15.007: I/ActivityManager(119): Starting: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/2/VIEW typ='application/pdf' flg=0x80001 } from pid 3635
은 '시작과 끝이 이럴 어떤 응용 프로그램이 그것을 처리하기 위해 발견되지 않는 것을 원인
는 K9 메일 때문에, 다른 매핑를 그리워 .. 내 생각이 전화를 잡아 그것을 전달 약간의 응용 프로그램을 구축하는 것이었다 그러나 예를 들어 독자가 열리지 않습니다 나는 것을 시도 :
이@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
Log.i(TAG, "Activity is called and created");
mapping.put("'application/pdf'", "application/pdf");
String type = getIntent().getType();
if (mapping.containsKey(type)) {
Log.i(TAG, "found mapping: " + type + " => " + mapping.get(type));
Log.v(TAG, "Intent before: " + getIntent().toString());
Intent i = new Intent(getIntent().getAction(), getIntent().getData());
i.setType(mapping.get(type));
i.setData(getIntent().getData());
i.setFlags(getIntent().getFlags());
Log.v(TAG, "Intent after: " + getIntent().toString());
startActivity(i);
}
finish();
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.i(TAG, "Activity is destroyed");
}
내가 "cmd를"뭔가를 생각 때문에 ... 잘못 디버거에
가 표시됩니다.12-28 08:38:51.445: V/ActivityForwardIntent(1195): Intent after: Intent { act=android.intent.action.VIEW dat=content://com.fsck.k9.attachmentprovider/01549957-459d-4ee3-b568-7e59390a9535/2/VIEW typ='application/pdf' flg=0x80001 cmp=de.blablupp.android.testproject/.ActivityForwardIntent }
누군가 나를 도울 수 있습니까? PDF 응용 프로그램에서 내용을 가져올 수 없습니까? 그러나 PDF 애플리케이션이 선택 가능하거나 시작 기능이 있다는 것을 알 수는 없습니다. 무엇 CMP를 의미 어떻게 내가 새로운 의도에이 정보를 설정할 수 있습니다
는 내용과 시작을 저장 정말 짜증나이기 때문에이 문제를 해결하기 위해 희망 - :-(
한 질문도? 파일 브라우저와 그것.
TIA 및
nauni reagards
서명이 삭제되었습니다. http://www.stackoverflow.com/faq#signatures –
BTW에서 "Intent after"로그 메시지가 잘못된 정보를 인쇄하고 있습니다. getIntent()는 프로그래밍 방식으로 작성한 의도가 아닌 Activity를 시작하는 데 사용 된 Intent를 가져옵니다. – dstricks