Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where File is saved in the phone?

 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody, actually I asked this question, but still i have not cleared my doubt.

Actually I had write following application to store data in txt file the application runs but I didn't get where the deore.txt file is saved under the phone.If i want to read the content of deore.txt file in phone then how to read that txt file.




Thanks..
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will be here: data/data/<your_package_context>

I thought you knew that already and in fact, you mentioned the destination yourself in this thread! You can use the File Explorer View in Eclipse to see the file.
 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Monu, I can see that file in data/data/com/micro/deore.txt on computer but how to read that file . I mean How to open that file on computer and on phone.
file.jpeg
[Thumbnail for file.jpeg]
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get it on your development machine, do an adb pull (there is an icon on the top right). Sometimes, you wont be able to see the contents but you can always check the size.

To open the File in you application, via code, use File I/O. (Same API you used to write to the file.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic