05-05-2013 10:43 AM
I am porting an Anroid APK to BB10. The porting process is painless and works wonderfully! But we have a major issue that makes our entire application non-functional. Need some help here. Here is some background:
NETWORK_ERR: NETWORK_ERR: XMLHttpRequest Exception 101
I thought maybe it was restricting it by file extension, but that is not the case. I made a test.txt file with just the word "test" in it, and that also gives the same error.
HOWEVER... If I request index.html, it works and I get the HTML source of the file. So this leads me to believe that my HTTP GET code is correct, but there is some security (CORS?) layer that is disallowing the request.
I found the following forum post:
In which is looks like the OP has the same issue. The suggestion is made to use config.xml to add these settings:
<access subdomains="true" uri="*"/>
<feature id="blackberry.app" required="true" version="22.214.171.124">
<param name="websecurity" value="disable" />
But I don't believe that I have access to a config.xml that the OS/browser/Android Runtime will make use of. Or do I? I have a config.xml file that is used by PhoneGapBuild to create my Android APK file. It is used to instruct PhoneGapBuild about various things such as icons, splash screens, and other preferences. Just as a shot in the dark, however, my next test will be to add these settings to that file and see if somehow they persist through the build process and if by some stretch of the imagination BB10 is able to make use of them in that file.
If anyone has any thoughts for me, I really look forward to reading them. Thank you very much in advance!