Re: [android-developers] Re: Sending email with attachment

2010-04-26 Thread andy
Hi, I want to receive Intent "android.intent.action.SEND" in a Service. Is it possilbe to register for this Intent via registerReceiver() and get the Intent in Broadcast receiver in the Service? Or is there any restrictions that "android.intent.action.SEND" can only be registered via Manifest.xml

[android-developers] Re: Sending email with attachment

2010-04-16 Thread powder
Sorry for not responding earlier. This worked for me: public static void sendFile(Context context) { String emailPreference = PreferenceManager.getDefaultSharedPreferences(context).getString("emailPreference", ""); String subjectPreference = PreferenceManager.getDefaultSha

[android-developers] Re: Sending email with attachment

2010-04-14 Thread Scout Ma
Thanks for your help. I want to write an application which will send email with an attachment through GMail on Android. But I don't have much time to study the basic of JavaMail. So, I wonder is there any sample for me to get in quickly. 2010/4/14 Kumar Bibek So, you want to learn how to create

[android-developers] Re: Sending email with attachment

2010-04-13 Thread robl2e
@powder Where should the setType() be placed then. I'm having difficulties getting this to work. Thanks in advance. On Apr 7, 2:11 pm, powder wrote: > Hi, > > Thanks so much Kumar! > > It turned out to be the placement of the line: > > sendIntent.setType("text/csv") > > Regards Jonas. > > On

[android-developers] Re: Sending email with attachment

2010-04-08 Thread Ferm
Where should it be placed? I also get size = 0 and then I get a error saying "file//: attachment paths must point to file:///sdcard" Igonoring attachment file On Apr 7, 11:11 pm, powder wrote: > Hi, > > Thanks so much Kumar! > > It turned out to be the placement of the line: > > sendIntent.set

[android-developers] Re: Sending email with attachment

2010-04-07 Thread powder
Hi, Thanks so much Kumar! It turned out to be the placement of the line: sendIntent.setType("text/csv") Regards Jonas. On Apr 5, 2:43 pm, Kumar Bibek wrote: > public static void sendFile(Context context) { >                 File exportDir = new > File(Environment.getExternalStorageDirectory

[android-developers] Re: Sending email with attachment

2010-04-05 Thread Kumar Bibek
public static void sendFile(Context context) { File exportDir = new File(Environment.getExternalStorageDirectory(), "mydir"); if (!exportDir.exists()) { exportDir.mkdirs(); } Str

[android-developers] Re: Sending email with attachment

2010-04-05 Thread Kumar Bibek
I will try this and let you know. Thanks and Regards, Kumar Bibek On Apr 2, 3:09 am, powder wrote: > The logcat says: > > ... > 04-01 18:33:06.230: INFO/ActivityManager(76): Starting activity: > Intent { act=android.intent.action.SEND typ=text/csv flg=0x300 > cmp=com.google.android.gm/.Compo

[android-developers] Re: Sending email with attachment

2010-04-01 Thread powder
The logcat says: ... 04-01 18:33:06.230: INFO/ActivityManager(76): Starting activity: Intent { act=android.intent.action.SEND typ=text/csv flg=0x300 cmp=com.google.android.gm/.ComposeActivityGmail (has extras) } 04-01 18:33:06.290: INFO/ActivityManager(76): Starting activity: Intent { act=and

[android-developers] Re: Sending email with attachment

2010-04-01 Thread Kumar Bibek
Some logcat logs will be helpful in trying to figure out what went wrong. Thanks and Regards, Kumar Bibek On Apr 1, 2:10 pm, powder wrote: > Hi, > > I never got this to work on a real device, got the email but no > attachment, also when installing K9 on a emulator and > then sending the email I