aspose file tools*
The moose likes Android and the fly likes File browsing and attachment problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "File browsing and attachment problem" Watch "File browsing and attachment problem" New topic
Author

File browsing and attachment problem

Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Hi all genius people,

I am new to android and wanted to send an email with the photos as an attachment.I am able to send the simple text mail.But I am not able to attach the file. Not even by java code.


Above code I have written based on some tutorial.
But what I need is to make the application which allows the user to browse the file from android device and also allows him to send it as an email.

Is there any example which is given in android SDK package?

Please guide me.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
http://developer.android.com/guide/topics/data/data-storage.html explains how to access files in both the internal and external (SD card) storage.
Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Lester Burnham wrote:


Thank you for reply.
I read that page. But I think you get me wrong.Imagine a gmail mail sending application.I need to design a mail sending application with user interaction and with the attachment facility as well.

The link which you have given me I do not think it will be useful for this purpose.

Correct me if I am wrong.

Thank you one again.
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What, exactly, are you looking for then? You asked about accessing files, which that page talks about. If the user is supposed to browse the files, then, yes - you need to write a GUI for that. Are you asking how to do that? If so, what do you have so far, and where, exactly, are you stuck making progress?

Also, you're aware that JavaMail does not work put of the box on Android, right? See the AndroidFaq for workarounds.
Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
Lester Burnham wrote:
Also, you're aware that JavaMail does not work put of the box on Android, right? See the AndroidFaq for workarounds.


Now you get me right.yes I have a gui format ready.And I think javamail works for that.


Above method successfully send the text email after passing valid gmail account detail.
And to display the box there is different code that i know,what I want to know is how to open "open dialog box",save dialog box etc..


Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Portable devices don't tend to do much with files -at least not with the user being made aware of it- so Android has no such GUI components. You'll have to create those yourself if you don't find any examples somewhere out on the web.
 
Consider Paul's rocket mass heater.
 
subject: File browsing and attachment problem