+ Halto and Shawn

________________________________
From: Crosswalk-help [[email protected]] on 
behalf of Matt Bargar [[email protected]]
Sent: Friday, August 15, 2014 3:22 AM
To: [email protected]
Subject: [Crosswalk-help] Accessing file system

Hi-
We're working on a Crosswalk app, and have a question. We are planning on 
writing a Crosswalk extension that deals with expansion files. At a high level, 
this theoretical extension would have two main tasks: 1. checking to make sure 
any necessary OBB files were downloaded correctly, and, in our case, unzipping 
the OBB file somewhere 2. providing a path to where the files were unzipped.

One of the tasks we know will need to be accomplished is reading files (html, 
css, images, audio) from the file system, after the expansion file has been 
unzipped. We have investigated the File API, and it's great for what it does! 
We are able to successfully read in images and text and deal with them from the 
javascript side (adding them to the DOM, etc.)

However, our ideal use case would be to be able to point Crosswalk to the 
unzipped expansion file (presumably mounted on /sdcard/ somewhere, we could get 
the path from the Java side) and have it read html files natively. i.e., we 
would have a /www/ folder in our expansion file, and we could direct Crosswalk 
to display files inside that /www/ folder (in an iframe, for example). What 
would be the best approach to this?

We have tried various forms of file:/// URLs (we always get "Not allowed to 
load local resource:" errors in the Chrome logs) and app:/// URLs (we get a 403 
Forbidden if we try to reach outside our app's sandbox).

We are currently using Canary (9.37.192.0). Thanks for any help you can give us!
-Matt Bargar

_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to