0

I am trying to make an app that can read, update, delete each line of a .txt file

How to access(read, update, delete) .txt file directly from the server with android device without having to download the .txt file.

This is the link I tried How to read from .txt file but I got error when I tried it

Community
  • 1
  • 1
Sieryuu
  • 1,510
  • 2
  • 16
  • 41
  • 1
    Put functionality on the server to read/update/delete the file. Send commands to that server-side functionality from Android. – Andrew Thompson Aug 27 '12 at 09:02
  • That tutorial doesn't look bad, in fact I will say its just a thing of permissions server side the main problem that you have when you want to access the file. Try giving permissions to the file of Writing and Reading. – reixa Aug 27 '12 at 09:16
  • @AndrewThompson Anyway, is there a way to implement in the java? – Sieryuu Aug 27 '12 at 09:17
  • @axierjhtjz I try at local server, and it is already has the write and read permission – Sieryuu Aug 27 '12 at 09:18
  • Sure. Servlet, JSP, maybe even RMI (I'm less familiar with that). – Andrew Thompson Aug 27 '12 at 09:32

1 Answers1

0

You would have to make the changes serverside if you don't want to download the .txt file.

However, since a .txt file usually isn't that big, it should not be a problem to download it, edit it and upload it again using FTP.

Søren Lorentzen
  • 868
  • 1
  • 11
  • 26
  • Yeah, the file is not big because only contain text I will consider to download if there is no other way, thanks for the answer – Sieryuu Aug 27 '12 at 09:19
  • You're welcome. If it helped you, please mark it as accepted. Also, if the text files becomes too big, have a look at http://stackoverflow.com/questions/6717165/how-can-i-zip-and-unzip-a-string-using-gzipoutputstream-that-is-compatible-with – Søren Lorentzen Aug 27 '12 at 09:20