Updating an app external file

Following the suggestions I got from the Community, and having the need to create an app that reads a txt from outside the app, modifies it and returns it outside the app, I assembled these blocks. It seems to work except that in the output file instead of adding two lines it adds only one. Is there any way to do this better?

You need a \n between lines.

There is a Join With Separator block for this.

OK I think I can manage the line problem. My major question is if the way I do this operation of updating an external file, is correct or there is a better way.

The core question is, should the text file be changed within the app or outside, i.e. by the user themselves by opening and editing the file on their device?

What I need to do is a simple app that uses a list of people. Each user will have to use their own list which they will have to provide to the app in some way. The app uses the list and may need to modify it using the external list. However, apart from the specific example, I would like to know if to provide a file to an app and have it returned modified I am using the correct path which seems to me to be tortuous.

Which external list? And answer my last question

The list in the block is only to explain my problem. If I have to answer to your question I answer both, in the app and outside.

As soon as a non-media file is changed outside the app (i.e. not by the app itself), the app no longer has access to it (at least not on Android 11+). Then SAF is needed.

Probably that means that the file is automatically transformed from external to internal file. OK again thanks.

This would work better with an online data base, like Google Sheets, or a tag/value data base.