Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

File browsing and attachment problem

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Grow your own food... or this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic