Shamse Alam
Shamse Alam

Reputation: 1315

Issue in loading HTML/JS files from appdata folder of windows 8.1 Cordova app

I am developing Cordova App for windows 8.1. I have developed functionality which downloads zip from web and extracts it to "AppData (appdata:///local/)" folder of the application.

That zip file has HTML and JS files. Now I want to display that html in windows app. I am accessing a html file 'home.html' file as "ms-appdata:///local/home.html", but it is not accessible

Any kind of help/suggestion will be appreciated

Upvotes: 2

Views: 490

Answers (1)

Shamse Alam
Shamse Alam

Reputation: 1315

Windows does not support accessing JS/HTML/CSS from AppData. To access JS/HTML/CSS from AppData (ms-appdata:///local/), insert a web view inside the index page as follows

<x-ms-webview id="id-web-view" height="100%" width="100%"></x-ms-webview>

and call navigateToLocalStreamURI to navigate the page.

Need to build a bridge to call into the cordova plugins in order to pass data back and forth from the content.

Upvotes: 1

Related Questions