send the picture via gmail's attached function?

All your problems with Audio, Video and Images.

send the picture via gmail's attached function?

Postby twsc » Wed Jan 28, 2009 2:30 pm

Hi All,
Is there any sample code to achieve the function like G1 Carema's share function?

I want to attach some existed JPEG files in the Gmail, and append some description on the field of subject and body of the gmail client UI.

Thanks very much!
twsc
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Jan 28, 2009 2:23 pm

Top

ACTION_SEND Question

Postby twsc » Sat May 09, 2009 2:35 pm

twsc wrote:Hi All,
Is there any sample code to achieve the function like G1 Carema's share function?

I want to attach some existed JPEG files in the Gmail, and append some description on the field of subject and body of the gmail client UI.

Thanks very much!


I found a solution to this question.

When I use the following code, it only attaches temp3.jpg. Does anyone know how to attach multiple files via Intent.ACTION_SEND? Thank you:) :D


Intenti=newIntent(Intent.ACTION_SEND);
i.putExtra(Intent.EXTRA_SUBJECT,"this is a test mail");
i.putExtra(Intent.EXTRA_STREAM,Uri.parse("file://"+SDCardPath+"/temp1.jpg"));
i.putExtra(Intent.EXTRA_STREAM,Uri.parse("file://"+SDCardPath+"/temp2.jpg"));
i.putExtra(Intent.EXTRA_STREAM,Uri.parse("file://"+SDCardPath+"/temp3.jpg"));


i.putExtra(Intent.EXTRA_TEXT,"hello mail");
i.setType("image/jpeg");
startActivity(Intent.createChooser(i,"Emailfile"));
twsc
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Jan 28, 2009 2:23 pm

Gmail doesn't send attachment

Postby sikus » Wed May 20, 2009 2:14 pm

Hello,
I need send attachment via email. I try this code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Intent i= new Intent(android.content.Intent.ACTION_SEND);
  2.  
  3.                 i.setType("jpeg/image");//this is correct for me or I don't see email client
  4.  
  5. //              i.setType("image/jpeg");
  6.  
  7.                 i.putExtra(android.content.Intent.EXTRA_SUBJECT,"this is a test mail");
  8.  
  9.                 i.putExtra(android.content.Intent.EXTRA_STREAM,Uri.parse("file://sdcard/dcim/Camera/1233417122606.jpg"));
  10.  
  11.                 i.putExtra(android.content.Intent.EXTRA_TEXT,"hello mail");
  12.  
  13.                 startActivity(Intent.createChooser(i,"Emailfile"));
Parsed in 0.042 seconds, using GeSHi 1.0.8.4

I see attachment and Remove button in email client but when I send email attachment is not delivered to me. What is wrong?
sikus
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Dec 15, 2008 3:48 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 22 guests