Skip to content Skip to sidebar Skip to footer

How To Share .gif File With In Other App Using Intent?

How to share .gif file in any of below Android apps: Whatsapp Snapchat Google Talk Line Viber Skype Facebook Messenger Using intent call for each apps.

Solution 1:

For Whatsapp you can use this:

publicvoidonClickWhatsApp(View view) {

IntentwaIntent=newIntent(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.

Solution 2:

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

Post a Comment for "How To Share .gif File With In Other App Using Intent?"