08-26-2013 07:06 PM
I have a perfectly running Android app. I converted my APK file to a BAR and now I'm running it on my Z10. Only on the Z10, I'm unable to access my web server. I've also done some work with WebWorks and I've read a lot about BB's default web security and how to get around it with a WebWorks app. I've been searching on the Android site, the 'Runtime for Android Apps' section, and BB's native section for anything about the default web security. I've been unable to find any articles or manuals talking about web security, outside of the WebWorks section. Does anyone know why I can't access my web server and what I need to do to get around that? Thanks
08-27-2013 03:36 AM
For the Android Runtime there is no such web security feature. So far I had no problem accessing remote URLs or hosts from my Android apps on BB10.
Do you have a timeout or a connection error? Is it an SSL connection?
08-27-2013 12:34 PM
Interesting, I know something is getting blocked only on the BB10 app, because the Android app I'm using is perfectly running on my Android. I have no timeout and I don't think it's a connection error, since the Android app works fine. I'm not using SSL.
08-27-2013 02:24 PM
Can you post your LogCat showing the failed connection attempt? Or maybe a code snippet so we can get an idea?
08-27-2013 06:55 PM
Unfortunately I don't think I can provide much evidence. I developed my app using Appery.io, a hybrid app builder that generates the necessary files for Android and iOS apps. So I haven't done any of my development on the Android side, or in Eclipse. As far as not being able to access my web server, I know this based on a popup in my app that shows up when unable to access the web server. My BB device is working fine and connected to the internet. As mentioned, my Android app works perfectly on my Android so that's why I think the BlackBerry is blocking access to my web server somehow.
08-28-2013 11:55 AM
I've tried the alternate route to a BlackBerry app, a mobile web app --> BlackBerry app using WebWorks. This has solved the issue of accessing my web server, as when using WebWorks to convert the app it's just a line in config.xml to allow access. Thank you anyway for the help!
08-28-2013 12:57 PM
I think the output of Appery was not a true Android app, but in fact a web application. That would explain the behaviour.
Just for curiosity: were you able to package with WebWorks / bbwp the same html code as you were using for the other platforms? Besides the config.xml file, was there anything to adapt?
08-28-2013 01:02 PM
Yes, that makes sense and I think as you said what the Appery platform generates is not a 'true' Android app.
I didn't change any configuration, other than adding the config.xml file for the WebWorks app.