How can I implement ability to attach files from file system to my application. Can I use some libraries, or I should do it myself programmatically? Or I can implement code of other similar application and use them?
Asked
Active
Viewed 777 times
0
-
have a look [here](http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension) – vikki Aug 23 '12 at 14:28
1 Answers
1
File browser:
A sample code for file browser. Or you can just let user input the location into an EditText
and let app remember it.
To use external storage(like SD card), please see here
Remember the file location:
It is a simpler way to save persistent data than SQLite database
Send it to server:
Here is an example of how to use HTTP POST to send to server

Community
- 1
- 1

Chao Zhang
- 1,476
- 2
- 14
- 25
-
ok, thank you. But should I put it with some other file manager or write my own one? – Rikki Tikki Tavi Aug 23 '12 at 14:43
-
@user1512250 Do you mean you need to add files from android external storage to your own application? – Chao Zhang Aug 23 '12 at 14:48
-
-
-
I want to implement ability to attach files from my file system to the application, like you attach files to your letter in the email client. And also provide an ability to send these files to the server... – Rikki Tikki Tavi Aug 23 '12 at 14:59
-
Hmm, first you need to know the location of your files. Then just let the application remember it and send it to the server. Is my understanding right? – Chao Zhang Aug 23 '12 at 15:06
-
yes...user should choose files from his file system, we should to remember paths of them in the file system and send them to the server after that... – Rikki Tikki Tavi Aug 23 '12 at 15:09
-
let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/15726/discussion-between-combozhc-and-user1512250) – Chao Zhang Aug 23 '12 at 15:17