0

I have converted a wordpress website into an apk using cordova which is intended for full offline use. My issue is that in the website there is a plugin which requests data from a JSON file found here https://www.true-echoes.com/?audioigniter_playlist_id=1127

<div class="elementor-widget-container">
     <div class="elementor-shortcode">
        <div id="audioigniter-1127" class="audioigniter-root" data-player-type="full" data-tracks-url="https://www.true-echoes.com/?audioigniter_playlist_id=1127" data-display-track-no="true" data-reverse-track-order="false" data-display-tracklist-covers="true" data-display-active-cover="true" data-display-artist-names="true" data-display-buy-buttons="false" data-buy-buttons-target="false" data-cycle-tracks="false" data-display-credits="false" data-display-tracklist="true" data-allow-tracklist-toggle="true" data-allow-tracklist-loop="true" data-limit-tracklist-height="false" data-volume="100" data-tracklist-height="185" ></div>
     </div>
 </div>

I want to be able to access that data offline, I've tried downloading the JSON file and linking it directly but it does not seem to work. I do not have a lot of knowledge with .apk's so any help would be appreciated.

I've read about including it in Shared Preferences of Android Studio which I have not managed to do, and my main problem is replacing that 'data-tracks-url' input to a local file. Seems very simple but I've been wrecking my brain for the past 3 hours :-)

Minal Chauhan
  • 5,739
  • 5
  • 15
  • 36
rakel
  • 1
  • Without knowledge about what happens with `data-tracks-url` I assume that you could pass a `file://` protocol instead `http`, to a file in file system – Vinicius Katata Apr 13 '21 at 12:37
  • "Fetch API cannot load file:///android_asset/www/1918-trobriands/te.json. URL scheme "file" is not supported." this is what i'd get then – rakel Apr 13 '21 at 16:26
  • that's because probably it's doing something like `fetch(url)`, look at this: https://stackoverflow.com/a/64195120/15611356 – Vinicius Katata Apr 13 '21 at 16:38

0 Answers0