04-04-2019 21:06
04-04-2019 21:06
I have a fair amount of static data I would like to read into my watch face. It's too much to be added to the code (about 150k) but it's not overly complex. (About 1,000 text lines I want to pull from and display for the user.) So I thought it would be perfect to be kept in the private storage area in a json or cbor file, and read as needed.
I have read through the File System Guide several times, so I know how to manage files in the private storage area, but there doesn't seem to be a way for me to "drop" a file into /private/data so it's there at install time.
I remember in my last project having difficulty using references to /mnt/assets/resources/ (although honestly, at this point I'm not sure why I abandoned using it, but I'm sure it was a good reason, as I like seeing the file directly when I test, and I couldn't do that using /private/data)
My question is: For files that I need to have in place at install time, is there no way to place them in /private/data? Do I need to stick with /mnt/assets/resources/ for that?
Thanks!!
04-04-2019 23:29
04-04-2019 23:29
I think you could place your static data into companion and transfer it via messaging.peerSocket to your clock to write to file, so it doesn´t block your RAM all the time (because your code for static data isn´t into app/index.js).