App Inventor can work with xml or json files; a kml file is a specially formatted xml. Technically, it is a basic text file.
You can convert kml to json or json to kml. How? Here is a beginning Redirecting to Google Groups These links provide some other potential ideas.
Is this possible? What you do depends on why you need the coordinate information in kml format. https://developers.google.com/kml/documentation/kml_tut and why you need to work with Google Earth. KML traks can be displayed (with some transformation) on the Map component as a LineString.
A location in kml format looks like
Where to store on the device so that when the app is removed, the kml file persists.
On Android 11+, this is certainly a problem. Since you can store offline and your original data is on a Google Sheet; I would store on your Google Drive.
The state of storing files since the recent version of App Inventor 2 nb187 and the total revision of how the File component works makes writing to the internalSD card or an external card almost impossible. You could consider storing on a FlashDrive stick using OTG.
You show an interesting diagraml. Be aware the File component changes and ramifications of nb187 are being discussed Release nb187: Copy a text file / image from assets to shared storage (→ Android 10+) . MIT is working to fix bugs and solve issues related as to what can read/write and where as you read this.
