02-15-2013 04:02 AM - edited 02-15-2013 04:03 AM
We have developed html5 application. For BB10 we are converting the APK into bar file. When we are running the application on BB10 device it is throwing the “"Network_error : XMLHttpRequest Exception 101" error inside the “jquery.i18n.properties-1.0.9.js” file. Same code working on the Android device. We have tried “async: true” inside Ajax call but unable to resolve. Any help ??
Note: file we are reading is part of application not any server
02-15-2013 05:06 AM
02-19-2013 08:20 AM
We already created the application for android devices. If we will use the webworks than we might face lots of issue?
03-01-2013 04:46 AM
Hi
I am also facing the same problem.
During ajax call
var ajax = new XMLHttpRequest();
try{
ajax.open('post',url, false);
alert(ajax);
ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
ajax.onreadystatechange = function() {
alert('onreadystatechange');
_oonreadystatechange(ajax);
}
var _oonreadystatechange = function(ajax) {
alert(ajax.readyState);
if (ajax.readyState == 4) {
if (ajax.status == 200) {
alert(ajax.responseText);
var resp=ajax.responseText.trim();
if(resp.charAt(resp.length-2) == ','){
resp = resp.substring(0,resp.length-2)+'}';
}
var dataarrey=JSON.parse(resp);
Ext.getStore('userInfostore').removeAll();
customerou= dataarrey.sm_userdn.split(',')[1].split('=')[1];
Ext.getStore('userInfostore').add({"mail":dataarre
}else {
alert(ajax.status+"Please Check Network Connection");
}
}
}
ajax.send(null);
}
catch (e) {
alert(e);
}
I am getting Error: NETWORK_ERR: XMLHttpRequest Exception 101
Have given alerts in the above code to debug as well,
in playbook alerts are comin in following order:
-[object XMLHttpRequest]
-onreadystatechange
-4
-0Please Check Network Connection
-Error: NETWORK_ERR: XMLHttpRequest Exception 101
Please suggest a solution.
Note:
We opted for the apk to bar conversion method, because we had a requirement to invoke playbook mail client with attachment, using playbook webworks sdk(since our existing code is in webworks ).
After exhaustively searching we found only the mailto option which has limitations of number of characters in message body and doesnt support attachment.
So finally after converting the apk android version of our app to bar, the bar was invoking the native mail client in playbook.
Now we ran into this ajax problem in the apk to bar converted executable, the apk is workin fine in android
Please give a solution
Thanks
Regards
Joel
03-01-2013 01:40 PM
@kamal_nigam It wouldn't introduce a lot more problems I guess. You will have to change some things to make sure the layout is correct for Webworks. But I guess that a lot of the actual code (not layout) can be kept as is. On top of that, your application will have a massive increase in speed. Because now you are using the HTML5 webview of Android, which runs inside the Android emulator, which runs on BlackBerry 10. If you are not willing to do some extra work for this speed bonus, you can still keep what you got. It should work as expected in both cases. At least if you are not having trouble with weird errors.
But I am afraid I cannot really help you in solving the problem.
@joeljesudossj I am afraid I cannot help you either. I don't really see why you are having this problem.
What I can recommend for both of you:
I have no more suggestions I can give you at this moment :/
Maybe somebody else can help you, and I hope
03-02-2013 12:12 AM
03-10-2013 09:50 AM
Hi is there a way to get the source code of hatax apk2bar. I tried googling but couldnt find the source code, there is only apk2bar.jar, Is there anyway to contact the developer of apk2bar.jar? If I can get hold of the API they are using to invoke the mail client with attachment, then i could probably use it directly in my webworks and generate a bar instead of building an apk and converting to bar.
This could be a useful workaround for me.
pls help
Regards Joel
03-11-2013 09:29 AM
kamal - I agree with your peers. Would highly recommend porting your HTML5 application away from Android. It may take some initial effort to re-package your assets using the WebWorks SDK (or PhoneGap) however you will be far happier in the long run.
The main reason why is because HTML5 applications running within the Android runtime are using the Android mobile web engine, not the one used by WebWorks and the BB10 browser. See this comparison to understand what you are dealing with:
http://html5test.com/compare/browser/bb10/android2
Also, Android offers very few ways of integrating your HTML5 content with BlackBerry 10 device features. Here is the complete list of developer APIs that you can use in WebWorks (none are available to your app while running inside of an Android container). Some highlights are Calendar, BBM, Payment : https://developer.blackberry.com/html5/apis/bb10_i
03-12-2013 01:54 AM
Hi Adam
Thanks for your reply, I went through the APIs for HTML5 in Playbook.
But I need an api to invoke e-mail client with attachment. https://developer.blackberry.com/html5/apis/blackb
The supported OS for this api is given as BB10. I tried in playbook device (running 2.1)anyways and it didnt work, its not invokin the mail client.
I will try including <feature id="blackberry.invoke.card" /> , which I doubt will solve this problem.
Am I missing something ? Or is is blackberry.invoke.card.invokeEmailComposer api not supported in Playbook 2.1? Is there any other way to invoke mail client with attachment in playbook using webworks?
Thanks
Regards
Joel
3 weeks ago
We are facing the exact same problem. Has anyone found a solution to this yet?