I'm working on an app that features an e-reader function for users to read a single book. Where should I save the text data for the book?
I experimented with storing pages as .json files in the assets folder but ran into issues. The path to the assets folder varies depending on the device the app is loaded on, and since my app will be available on multiple platforms, this method didn't work well. Additionally, making http requests within the app seemed impractical.
I also tried importing json files as an import, but this wasn't ideal because the file loaded should change as the user moves to the next page.
I considered using Ionic Storage - it would be a good solution if I could load all of the book's data into the ionic storage sqlite database. However, I can only write one key and value at a time, resulting in a cumbersome process when the app loads for the first time and the book's content is written into the sqlite database from my ionic_storage_service.ts.
Can anyone offer suggestions or ideas on a better approach? Any input is appreciated. Thank you!