andrey
andrey

Reputation: 11

How can i share video from application?

I want to share video from app, but i don't know how to do it. How share video without download?

i tried donwload video and than share, But i don't need download that video.

                String type = "Video/*";
                String fileName = mNum;
                String MediaPath = Environment.getExternalStorageDirectory() + "/folder/" + str;
                MediaPath = MediaPath.replace("/storage/emulated/0/folder/","storage/emulated/0/Android/data/relax.justrelax/files/folder/");

                Intent share = new Intent(Intent.ACTION_SEND);
                share.setType(type);
                File file = new File(MediaPath);
                Uri uri = Uri.fromFile(file);
                share.putExtra(Intent.EXTRA_STREAM, uri);
                startActivity(Intent.createChooser(share, "share"));

I can share with download

Upvotes: 0

Views: 274

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006614

How share video without download?

Use EXTRA_TEXT and put the URL in as part of your message.

Upvotes: 1

Related Questions