Hello I want to send file from my phone using intent. I get file patch in this way:
Intent get=new Intent();
get.setAction(Intent.ACTION_GET_CONTENT);
get.setType("*/*");
startActivityForResult(get,2);
and I receive path and send file in this way:
if (requestCode == 2)
{
path = data.getData();
Log.d("PATH", path.getPath());
Intent send=new Intent();
send.setAction(Intent.ACTION_SENDTO);
send.setType("*/*");
send.putExtra(Intent.EXTRA_STREAM,path);
//startActivity(Intent.createChooser(send,"Sending"));
}
Everything would be right but when I send file, it has an odd name, eg: orca_share_media1496666382761 how can I change the file name to be as it should be? I found different solution but there path was in String