Sharing images via email and social network ?

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Sharing images via email and social network ?

Postby ibtmubarak » Tue Sep 13, 2011 7:46 am

Hi,

How to share a image via email and social network like facebook,twitter?
i was trying to send a image via emai for the following code but only file name only attached the mail, not actual image it is showing 0 K bytes . any idea?

Code: Select all
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
            String path = "//sdcard/images/one.jpg";
            Uri screenshotUri = Uri.parse(path );

            sharingIntent.setType("image/jpg");
            sharingIntent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
            startActivity(Intent.createChooser(sharingIntent, "Share image using"));


Thanks
Mubarak.
mubarak
ibtmubarak
Developer
Developer
 
Posts: 44
Joined: Thu Feb 28, 2008 12:26 pm
Location: Bangalore

Top

Return to General

Who is online

Users browsing this forum: No registered users and 4 guests