BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-04-2007, 11:09 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2007
Model: 8700c
PIN: N/A
Carrier: AT&T
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default HttpConnection

Please Login to Remove!

Again, yes :P Have no idea why it's such a confusing concept to me, haha.

I figured out why my networking thread keeps freezing at Connector.open(URL);

Another thread on this forum (Post Data with HTTP Connection!) mentions that "The calling HTTP connection must be wrapped into a Thread in an GUI application on Blackberry."

I have a rough idea of what this means, but is there any additional help on this? i want to figure out how "wrapping" something into a thread in a gui application is accomplished.

I have 3 screen classes and one function. When i call my networking thread in the function, it freezes at connection.open. When i call this same networking thread in a screen, it works. I need to call it every time a button is pressed though, and in the listener, it freezes.

Last edited by predator : 12-04-2007 at 11:33 AM.
Offline  
Old 12-04-2007, 02:19 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2007
Model: 8700c
PIN: N/A
Carrier: AT&T
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Problem solved, kind of. I know why it kept freezing, but have a question. For some reason, since my networking thread wasn't being called on the initial screen, the device was no longer asking me for permission to access the internet. It was automatically denying it, which made Connector.open fail.

My question now is, is there a way for me to force the application to ask for access to the internet if it isn't already granted?
Offline  
Old 12-05-2007, 02:38 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can grant the rights via policy or edit them manually in the module properties. There is no way for software to grant rights to itself as this would be against the idea of having them in the first place.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 12-05-2007, 08:04 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Nov 2007
Model: 8700c
PIN: N/A
Carrier: AT&T
Posts: 32
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply I'm actually not trying to make the code change the policy but i want it to check whether it is allowed to access the internet. If internet connection permission is set to false for this app, i want to show an error message to that regard along with instructions on how to change it. So basically, i just want my code to check whether it has internet connection permission or not.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.