FileNotFound(Invalid Path) in Implicit Intent File Sharing

52 views Asked by At

I am trying to access a file from Movies Directory named "myfile.mp4" for sharing using implicit Intent

but this is not working..

I think i am not getting the correct path? right?

My code

 Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("video/*");
            intent.putExtra(Intent.EXTRA_STREAM,Uri.parse(Environment.DIRECTORY_MOVIES+"/filename.mp4"));
            Intent shareIntent = Intent.createChooser(intent, null);
            startActivity(shareIntent);
0

There are 0 answers