Hi fellas,

I am writing a email application so need a help on the following
problem:

How to retrieve a file from path "file:///data/data/<my-app>/files/
sam.txt"

so that i can mail this file using JavaMail API

here file attachment code is:

public void addAttachment(String filename) throws Exception {

            BodyPart messageBodyPart = new MimeBodyPart();
            DataSource source = new FileDataSource(filename);
            messageBodyPart.setDataHandler(new DataHandler(source));
            messageBodyPart.setFileName(filename);

            _multipart.addBodyPart(messageBodyPart);
 }

Note: I don't want the Inbuilt Email app of Android to do the above.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to