04-09-2013 12:08 PM
Got a web app compiled for 6 different device types and came accross an issue causing the BlackBerry 10 Vendor submission review to be denied because of a blank window. The webworks web app successfully finds index.html and the code is as follows:
However window.open(authUrl,'_self'); loads the page in a new "window" outside the app frame. I've also tried window.location = authUrl, window.location.href = AuthUrl, etc. It seems that instead of loading the external URL in the same frame, it is using the invoke method instead which is the opposite of what needs to happen.
Any ideas to get page loaded in same instance like OS7 and lower, Android, iOS, etc.?
Thanks in advance!
Solved! Go to Solution.
04-09-2013 07:00 PM
04-11-2013 10:49 AM
I tried pulling the data via ajax, and pasting over a div I put onto the index.html page while also having:
<access subdomains="true" uri="*" />
"Access to 'http://server.host.org/xsp/.ibmxpr/widget/layout/l
However I can access the link from the z10 browser just fine as it opens the js file.
I've also tried using:
<access uri="http://host.server.org" subdomains="true"> <feature id="blackberry.app" required="true" version="1.0.0"/> <feature id="blackberry.invoke" required="true" version="1.0.0"/> </access>
within the config.xml file, but the new window opens which is the original problem. However, it renders as expected just like opening url in the device's browser.
Seems like even though the uri is set to allow all, there is still a security issue getting the js files from the server.
Have you seen any querks like this?
04-11-2013 10:56 AM
You wlil need to explicity whitelist any extenal resources loaded via XHR. This is outlined in the documentation:
04-11-2013 10:56 AM - edited 04-11-2013 10:59 AM
04-11-2013 11:02 AM
@gdsimz - Try disabling the child browser.
Disables child browser windows. By default, when the content attempts to open a resource in a new window or tab (by using window.open(), or by specifying _blank as the target of an anchor), the WebWorks app will open a secondary browser window to display the resource. This feature is enabled by default.
When name="childBrowser", the value attribute must specify a value of "disable".
<feature id="blackberry.app"> <param name="childBrowser" value="disable" /> </feature>
04-11-2013 11:30 AM
Skimmed over that too quickly
Double check your URLs. The error message says server.host.org but the whitelist is for host.server.org.