0

How to share .gif file in any of below Android apps:

  1. Whatsapp
  2. Snapchat
  3. Google Talk
  4. Line
  5. Viber
  6. Skype
  7. Facebook Messenger

Using intent call for each apps.

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
Ravi Sahu
  • 85
  • 1
  • 1
  • 9

2 Answers2

0

I think if you want to share with specific applications you have to use URIs of this application. You can fin example and explanations for Skype here : http://developer.skype.com/skype-uris

But if you want to share with all applications available, you just have to set the content type as a binary file as explained here : http://developer.android.com/training/sharing/send.html

Maxime
  • 1,332
  • 1
  • 15
  • 43
  • Thanks for reply.sent link for skype is ok for me.Do you know same methods for others apps. – Ravi Sahu Nov 20 '13 at 08:06
  • You just have to make a search like "Android Whatsapp uri" and the first answer is this : http://stackoverflow.com/questions/15462874/sending-message-through-whatsapp I think doing the same for other applications will give the solution. – Maxime Nov 20 '13 at 08:15
0

For Whatsapp you can use this:

public void onClickWhatsApp(View view) {

Intent waIntent = new Intent(Intent.ACTION_SEND);
waIntent.setType("image/gif");
waIntent.setPackage("com.whatsapp");
if (waIntent != null) {
    waIntent.putExtra(Intent.EXTRA_STREAM, uriToImage);
    startActivity(Intent.createChooser(waIntent, "Share with"));
} else {
    Toast.makeText(this, "WhatsApp not Installed", Toast.LENGTH_SHORT)
            .show();
}

}

For the other apps you can choose the same scheme I think.

bummi
  • 27,123
  • 14
  • 62
  • 101
kai
  • 534
  • 4
  • 12
  • Does it work for you? – kai Nov 20 '13 at 12:40
  • 1
    for me it doesn't work – dangalg Jun 07 '15 at 21:16
  • try this: `private void ShareGif() { Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("image/*"); Uri gifUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+ "Download/1027"+".gif")); shareIntent.putExtra(Intent.EXTRA_STREAM, gifUri); startActivity(Intent.createChooser(shareIntent, "Share GIF")); }` – Deepti May 08 '17 at 10:25