I googled a lot but no success. I want to share a video file in my App via this code:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("video/mp4"); //or even video mpeg not working!
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + outputFileInformation.getFullPath()));
startActivity(Intent.createChooser(intent, getString(R.string.share)));
And I tried some other codes, But for in sharing list if I choose Viber, After selecting recipient nothing happens, Screen flashes and nothing happens.
(I must say sharing image/png
has no issue.
I really need to get this work soon.
I could easily share that video from gallery without any issue but now working in my app... .
I manged to make it work. I must make an Uri in another way, here is the code i used for making Uri from a video file path (you could change it for Images as well)