-1
Bluetooth
을 통해 파일을 공유하고 있습니다. 파일이 성공적으로 전송되었지만 파일을 완전히 보내면 문제가 발생하지 않습니다.BluetoothOppLauncherActivity 브로드 캐스트 이벤트를 수신 할 수 없습니다.
File file = new File(Environment.getExternalStorageDirectory() + "/Download/file_to_sent.txt");
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.setComponent(new ComponentName("com.android.bluetooth", "com.android.bluetooth.opp.BluetoothOppLauncherActivity"));
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
startActivity(sharingIntent);
가 어떻게 파일 전체/하락 이벤트를 수신 할 수 있습니다 : 나는이
<receiver android:name=".FileSentReceiver"
android:exported="true">
<intent-filter >
<action android:name="android.btopp.intent.action.TRANSFER_COMPLETE"/>
</intent-filter>
</receiver>
과 파일을 공유 할 수있는 코드로 AndroidManifest.xml
에 수신기를 추가 한입니까?
를 참조하십시오, 그것은 이러한 이벤트는 다른 응용 프로그램에서 수신 할 수없는 것으로 보인다. –