Open atukilham opened 8 years ago
Hi @atukilham - You should be able to access it by URL
XAPKReader.get("img/file.jpg", successCallback, [errorCallback], [fileType]);
Hi @imaffett - I'm having the same issue as @atukilham. I was previously using a different plugin for APK expansion, but it wasn't compatible with Cordova 5.0.
I installed your plugin and have everything set up and Android Studio building with no errors, but in my app I am currently calling images with a URL, like "content://com.myapp.name.expansion/assets/img/file.jpg". The method you supplied above seems to be a function call.
Below is a link to the GitHub page for the plugin I was using before. Under "Using", you can see how the instructions indicate that you can either use a function call (exactly like the one you provided), or alternately you can use the File API/content provider to access the files via URL.
https://github.com/moust/phonegap-xapkreader
In order to use the URL method to call images with the Moust plugin, I had to add an additional attribute to xapkreader.xml of:
name="xapk_expansion_authority" value="com.myapp.name.expansion"
Is there a similar way to use the File API/content provider with your plugin to call images via URL?
Thanks
Hi, @imaffett, i try your plugin for cordova 5.0. but i don't know how to access my file on expansion file with API like XAPKReader.get(filename, successCallback, [errorCallback], [fileType]); i have subfolder on my obb file like : main.1.com.mypackage.myapp.obb/main_expansion/img/file.jpg
can i access file.jpg with URL like content://main.1.com.mypackage.myapp/main_expansion/img/file.jpg. I tried, but didn't work. Can you help me? Thanks