Giter VIP home page Giter VIP logo

Comments (14)

agamemnus avatar agamemnus commented on May 22, 2024

Shouldn't you have a . after the 0?

If it's not that, go ahead and make a sample project that I can run. I'll
check it out.
On Dec 14, 2015 11:19 AM, "Matt Bargar" [email protected] wrote:

Hi,
I really appreciate this plugin -- it's made my life a lot easier! I do
have one question/potential issue

We have set up a simple app, and the premise works great -- we can load
images from the expansion pack, etc

However, one of the key things we are trying to do is set an iframe's src
to an html file that is in the expansion pack, and this is failing silently
Our initial assumption was that this was some type of security restriction,
but we followed the instructions in the readme at
https://githubcom/agamemnus/cordova-plugin-xapkreader/blob/cordova-531/READMEmd
We are using your whitelist plugin

We are setting the iframe's src using simple javascript: $("iframe")[0]src
= "content://comcloudkidexpansion/main_expansion/(path)/indexhtml"

We aren't seeing any output in any log, either using adb logcat or
inspecting it via Chrome

We have also tried with and without the crosswalk plugin, and it makes no
difference

We can get the contents of the html file in the expansion pack using
jQueryget("content://(path)/indexhtml") and verify that the html file exists

Is this a known issue? We can create a simple version of our app with
non-proprietary content if that would help diagnose things Please let me
know if you need more details Thanks!


Reply to this email directly or view it on GitHub
#38.

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Hi-
Yeah, that was just bad copy/pasting into the github issue. I made a slimmed-down project, attached as a zip. I have a theory that it has to do with the mime type of the assets, but that theory may be wrong. Thank you so much for any insight you have, I really appreciate it; I've been looking at this for a while now with no luck.

expansionApp.zip

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

(I think some changes to the Cordova code might be needed, but I don't remember..)

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Good idea - I tried removing the whitelist plugin, but no change.

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

And when you removed it, you also edited some other code to make that work? Last time I tried removing the whitelist plugin, it wouldn't compile.

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Yep, it compiled -- I did have to comment out a line in the config.xml -- <plugin name="cordova-plugin-whitelist" spec="1" /> otherwise the build process would try to re-add the plugin.

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

Ok, I'll try the zip soon.

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Thank you so much, I really appreciate it. 😃

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

The local load is working correctly?

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

What happens when you don't use any parameters? ("?test") I think it is because it can't handle parameters.

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Hi, the url parameters don't matter, I should have stripped that out of my test.

The local load works correctly for me - if you tap on the 'game 1' button you should see some text overlaid on top of the image. (The text is the content from www/assets/games/localGame/index.html.)

from cordova-plugin-xapkreader.

thebarge avatar thebarge commented on May 22, 2024

Ha! I figured this out. My suspicion about the mime-type was correct -- to test in a hacky way, I switched the mime-type from "vnd.android.cursor.item/asset" to "text/html" in XAPKProvider, and commented out the mime-type check in DownloadThread (lines ~679-685). Doing that, I was able to see basic html, at least. Progress.

I'm going to fork the code for now (https://github.com/SpringRoll/cordova-plugin-xapkreader). Thank you!

from cordova-plugin-xapkreader.

agamemnus avatar agamemnus commented on May 22, 2024

I wonder if there's an easy way to just make it use the correct mime-type... I will think about this, but let me know about your progress too, so I can integrate it.

from cordova-plugin-xapkreader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.