Я делюсь файлом через Bluetooth
. Файл отправлен успешно, но проблема в том, что я не могу получить какое-либо событие, когда файл был отправлен полностью. Я добавил приемник в AndroidManifest.xml
вНевозможно принять события вещания BluetoothOppLauncherActivity
<receiver android:name=".FileSentReceiver"
android:exported="true">
<intent-filter >
<action android:name="android.btopp.intent.action.TRANSFER_COMPLETE"/>
</intent-filter>
</receiver>
и код для обмена файла как:
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);
Как я могу получить файл полных событий/падения?
Я попробовал эти события, но до сих пор не удалось получить, это выглядит, что эти события не могут быть получены из других приложений. –