Recent

Author Topic: LAMW - read and write text files  (Read 588 times)

gitchef

  • Newbie
  • Posts: 5
LAMW - read and write text files
« on: October 19, 2022, 12:30:28 pm »
Hello everybody,

I am developing an App that receives data from a Windows PC using sockets.
The data transfer works fine, the received data is tranfered to a stringlist, the App creates a new text file and stores the received data (approx. 20 lines of text) to that file. So far, so good.

The App works fine with Android 9 but due to the changes in Android 10, the file handling needs to be changed.
My problem is as follows: How do I save the complete StringList to a text file and how do I read the complete file into a StringList.
The example AppPublicFolderAccessDemo1 does not help as it only deals with text files consisting of just one line / one single string. Maybe I am just to blind to see...  ;)

Thanks a lot for your help.

Stefan

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - read and write text files
« Reply #1 on: October 21, 2022, 02:18:57 am »
you could change your option, build small win server/socket -> json format data -> jhttpclient consume.

gitchef

  • Newbie
  • Posts: 5
Re: LAMW - read and write text files
« Reply #2 on: October 21, 2022, 09:30:14 am »
Thank you for your answer.
I have been considering this option as well but I did't want to make major changes on the Windows side, if I don't have to. Maybe I should have a closer look on this solution.

Mongkey

  • Sr. Member
  • ****
  • Posts: 430
Re: LAMW - read and write text files
« Reply #3 on: October 21, 2022, 09:42:23 am »
Fpc got many samples, go on fcl-web, deep dive, you'll find hidden gems there  :D

 

TinyPortal © 2005-2018