I'm using following simple code to tranfer a textfile via bluetooth to an other device:
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.setPackage("com.android.bluetooth");
sharingIntent.putExtra(Intent.EXTRA_STREAM,Uri.parse(path));
activity.startActivity(Intent.createChooser(sharingIntent,ctx.getResources().getString(R.string.send_pubkey)));
"path" is the full path to the file to be transferred (and is valid). When I try to send the file I get a message the "unknown file" could not be transferred. So...what is wrong here? Why is this file unknown?
Thanks!