06-27-2013 02:33 AM
I converted an Android .apk into a .BB10 .bar using command-line tools, and installed it on a BB10 Dev Alpha B device.
It returns an error to an AJAX call, which is cross-domain i.e. to http://... and not to file:// (it is a hybrid app written using both HTML5 and Java).
Several attempts to debug/workaround this issue have only resulted in the error changing (e.g. DOM Exception 11, error 101, or an AJAX error with no further information).
Server logs show that:
- the cross-domain AJAX (POST) request, HTTP request headers, and data were received from the device by the HTTP server
- HTTP response headers and (JSON) data were sent by the HTTP server
However, no additional information has been found. A cross-domain security issue seems the most likely cause, but no workaround has been found (added a config.xml into assets/www but it may not be used by Android .apk translator or the syntax may be incorrect -- e.g. can IP addresses be used or must the url define a domain name?)
Is it possible to perform such cross domain calls (from JS in a converted Android hybrid app) or does a BlackBerry hybrid app explicitly need to be written?