Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File browsing and attachment problem

 
Hardik Trivedi
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic