Project files & Cordova

0 favourites
  • 3 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • My plugin loads a lot of external resources included as project files, mostly using XMLHttpRequest. The problem is, even though everything works in browsers / NW, when i build using XDK and cordova / crosswalk, the project files users include for stuff like models which are normally loaded just fine using responseText and .open() aren't ever found when running on an android device. Even more strangely, everything works fine in the XDK device emulators.

    I'm really trying to get around this issue but I've hit a wall since i have very little experience with xdk / crosswalk / mobile wrappers. I don't know if construct does something special with the project files specifically in crosswalk, but i've had no luck figuring out the issue thus far.

    I would be so greatful for any help from Ashley or anyone with some more intuition than me on how crosswalk / cordova work with these kinds of local files.

  • AFAIK AJAX requests to local files work on all platforms (apart from Windows Phone 8.1, but you can work around it using the old-fashioned ActiveX based HTTP request). However they can complete with a status code of 0 as opposed to 200, which kind of makes sense given there wasn't actually a HTTP response. Some code snippets assume that any response other than 2xx is a failure, so make sure your code accepts 0 as success.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Im already checking both, it gets through but responseText is null/empty. Am i requesting a bad url? From what i gather all files are in tge assets/www/ folder which means relative urls to files should properly work. Indeed they do in the emulator but not on actual devices. Its perplexing behaviour.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)