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

Adobe AIR Development

Reply
Regular Contributor
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

network access issue

Hi folks -

 

I have an app that is "live" in the App World.  I have it "grab" a file from my server for use within the App using the following code:

 

var topFiftyURL:URLRequest = new URLRequest("http://www.mywebsite.com/top50.txt");

var topFiftyLoader:URLLoader = new URLLoader();

topFiftyLoader.addEventListener(Event.COMPLETE,procTopFifty);

topFiftyLoader.load(topFiftyURL);

function procTopFifty(e:Event):void {

//do some stuff with the file that has been loaded in here

}

 

I also have a webpage load into QNXStageWebView:

 

var webView:QNXStageWebView = new QNXStageWebView();

webView.viewPort = new Rectangle(513,390,511,210);

webView.loadURL("http://www.mywebsite.com/xxx.html");

 

The app works fine for me on my PlayBook and there are a few rating/reviews saying people are happy with the app so I know it works for some people out there.

 

However, there are a few reviews from people saying that the app didn't work for them and I have also received emails from two people (including one screenshot) that basically shows the app freezing (and the QNXWebViewWindow giving a "network error") exactly at the point where the above loads should be loading.

 

Does anyone have any idea why the loads wouldn't work on some people's PlayBooks?  They claim to be connected to the network via WiFi (and I believe them), my server is hosted professionally and as far as I know has good uptime so I do not think that is the issue.  I can access my website from various machines (including my PlayBook) that I use at home and elsewhere.  

 

blackberry-tablet.xml has:

<action>access_internet</action>

which I assume means that the app has to access the internet so I belive I have that set properly.

 

Are there other settings that I should have within the xml files?  Or perhaps settings on the person's PlayBook that might be blocking certain websites?  Or perhaps if they have the Browser open or App World open as a background app, could that block my app in the foreground from accessing the internet (unlikely I know but just throwing it out there in case it jogs something in someone's memory).

 

Thanks for any clues or hints that anyone can provide.  I am really baffled on this one.

 

...Jim

Playbook Apps: MusicMasterLite, MusicMaster, GridPUZZLE

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: network access issue

If you are in contact with 1-2 people that are having trouble, see if they will help you trobleshoot the issue. 1) have them go to your website (top50.txt) directly from the browser (rule out network issues). Areyou using stagewebview to show the scores or for something else?
Regular Contributor
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: network access issue

Thanks John - The Music Master for BlackBerry Playbook application is a youtube playlist manager / music player. top50.txt is a file that I serve to the app to give people what the top 50 songs are for this week (I serve it from the server so that I can update it easily vs modifying the app and resubmitting it to the store).  qnxstagewebview is used separately to display the youtube video.

 

Good suggestion in asking people to help out - I am now doing that (eg asking someone to run a trace route to see if and how they get to the server) but I also thought I would check here to see if anyone can spot something that I may have missed in a setting in "xxx-app.xml" or "blackberry-playbook.xml" or if there is some "only certain apps can access the internet" setting directly on the playbook that I wasn't aware of.

 

...Jim

 

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: network access issue

I doubt, place a try/catch block around some of the code. Someone can turn off permissions to the rules defined in the BB xml file, so you can turn those off yourself to see if that causes the problem. It would be nice if the application could query the current permission state in case a user turns those off. A couple of my users had trouble accessing "shared" and found that the permission was "off", but they never did that themselves. So there might be an issue with those permissions being turned off or not set correctly during install. This is hit and miss.
Developer
Posts: 231
Registered: ‎05-03-2011
My Device: PlayBook V1 and proud of it :-)
My Carrier: Legs

Re: network access issue

Hi, have you tested it in a bridge situation with a BlackBerry Phone, and the only two other options that I could see that might cause you problems are access_bbid_authenticate (Authenticate the user to an external system) and access_shared (Read and Write files that are shared between all applications run by the current user. This second option I could see causing problems, but it shouldn't.Smiley Happy

Keep the Forum productive and useful for all. Click Kudos button if I've helped you. Select Solved to help everyone.

PlayBook qualifying app - Pandoras' Lights
Blog - CoCopia.co.uk Catch me on Twitter cocopia_apps