3

I have an app that I use an intent filter to handle a certain file extension. If a user gets an email with that file as a file extension and clicks on "view", it will bring up a list of programs that can use that file. My app is in that list, but I have noticed I can't actually get the information from that file unless the user first hits "save" and then "view" from their email application.

I've traced out the path that it is returning when the user clicks view without save and it looks like this:

/myEmail@gmail.com/messages/140/attachments/0.1/BEST/false: false : false

If they select save and then view, it gives me a real path that I can use:

/sdcard/download/file.xxx

So my question is: Is there a way to get the file or the files contents when the user selects "view" and selects my app without saving it first? Where does it put the file when you click "view" instead of "save" (fetching attachment), and what type of file does it save it as. This particular file extension I am using is .xml

EDIT : I know other default programs can do this, so it has to be possible. I'm just not sure of the best way to go about this.

Nick
  • 1,262
  • 1
  • 17
  • 32
  • Were you able to resolve this issue? If so, can you please post your answer. If not, I have come across tmp files and I have noticed that common practice is the for developer to "save" tmp files where they see fit. Not in a central tmp directory. Not saying that is the case for all, but a few. ["Google Groups talking about where they save tmp files"](https://groups.google.com/forum/?fromgroups#!topic/android-developers/tZrxqZQLh98). ["Android: Where should I save temporary files?"](http://stackoverflow.com/a/5899304/1134705) – jnthnjns Jun 21 '12 at 20:56
  • Hi Nick, were you able to resolve this issue? – Ahmed Faisal Mar 12 '13 at 16:05

0 Answers0