It is already asked but i didn\'t find any solution. For bluetooth application i am using the bluetoothShare.class
.
My source code for sending the file to
BluetoothShare class not supported android 4.1 and above. you can use the following intent coding to send file in android version 4.1 and above
Intent intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setComponent(new ComponentName(
"com.android.bluetooth",
"com.android.bluetooth.opp.BluetoothOppLauncherActivity"));
intent.setType("image/jpeg");
file = new File(filepath);
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
startActivity(intent);
and also some devices in Android v 2.2/2.3 not send the file via bluetoothShare class.