Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
Contributor
Posts: 13
Registered: ‎07-17-2013
My Device: Z10
My Carrier: Rogers

How to Allow Access to Remote Web Server?

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

Trusted Contributor
Posts: 160
Registered: ‎11-17-2010
My Device: PlayBook, Z10, Q10

Re: How to Allow Access to Remote Web Server?

Hi,

 

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?

--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Contributor
Posts: 13
Registered: ‎07-17-2013
My Device: Z10
My Carrier: Rogers

Re: How to Allow Access to Remote Web Server?

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.

Trusted Contributor
Posts: 160
Registered: ‎11-17-2010
My Device: PlayBook, Z10, Q10

Re: How to Allow Access to Remote Web Server?

Can you post your LogCat showing the failed connection attempt? Or maybe a code snippet so we can get an idea?

--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Contributor
Posts: 13
Registered: ‎07-17-2013
My Device: Z10
My Carrier: Rogers

Re: How to Allow Access to Remote Web Server?

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.

Contributor
Posts: 13
Registered: ‎07-17-2013
My Device: Z10
My Carrier: Rogers

Re: How to Allow Access to Remote Web Server?

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!

Trusted Contributor
Posts: 160
Registered: ‎11-17-2010
My Device: PlayBook, Z10, Q10

Re: How to Allow Access to Remote Web Server?

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?

--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Highlighted
Contributor
Posts: 13
Registered: ‎07-17-2013
My Device: Z10
My Carrier: Rogers

Re: How to Allow Access to Remote Web Server?

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.