마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

삼성폰에서는 되는데 다른폰에서는 안되는 블루투스 인텐트 코드 관련..

0 추천
File manualFile = new File(dir, "/sdcard/DECO/P22.jpg");
Uri uri = Uri.fromFile(manualFile);
String type = "application/pdf";
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType(type);
sharingIntent.setClassName("com.android.bluetooth", "com.android.bluetooth.opp.BluetoothOppLauncherActivity");
sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(sharingIntent);
 
보시는 것처럼 인텐트 이용해서 지정되있는 파일을 블루투스로 보내려 하는데요
갤럭시 시리즈에서는 에러가 안나는데
스카이 베가? 이런폰으로 돌리면 에러가 뜹니다... 왜그런지요 ㅠㅠ
한퀴에달성 (180 포인트) 님이 2013년 9월 11일 질문

1개의 답변

0 추천
로그캣을 봐야 확실히 알 수 있겠지만,  폰에 따라 블루투스 앱 패키지명이 com.android.bluetooth 이 아니거나  com.android.bluetooth.opp.BluetoothOppLauncherActivity 가 없을 수 있습니다.

좀 더 제대로 처리하려면 http://tsicilian.wordpress.com/2012/11/06/bluetooth-data-transfer-with-android/ 이 글을 보세요.
익명사용자 님이 2013년 9월 11일 답변
아 감사합니다!! 근데 그 폰의 블루투스 앱 패키지명을 알고 싶으면
어떻게 하나요??
...