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.