Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
03-30-2011 02:20 PM
I'm making an app that used the Blackberry Player library, and I run it on a seperate thread. I also do HTTP requests within my app for different things. My problem is that even though the player is on its own thread, it blocks all my HTTP requests, so the program will hang until the song ends (if the user tries to access a different screen that uses a new HTTP request). Anyone any idea why? I use the Blackberry Simulator with the MDS simulator. Unfortunately I can't try it on my phone, but I can't see why that'd make a difference.
03-30-2011 02:42 PM
You should never put a HttpConnection in the event thread because it will block everything until it completes. Try putting all of them in their own threads and see if that fixes your problem.
03-31-2011 09:10 AM
The problem is not that the UI freezes until it completes, rather that the request never completes (though it would were the player thread not running). I've moved the HTTP request to a separate thread but it still does the same thing. Any more ideas? It's like theres a limit to one HTTP request thread or something.
03-31-2011 09:13 AM
Make sure the server you connect to is actually available.
03-31-2011 09:19 AM
player = Manager.createPlayer(url);
In a method in a PlayerThread, which does this when it is started.
And for the actual HTTP request (which is definitely connectable, as it works as soon as the song finishes):
c = HttpUtils.makeHttpConnection(url, null, null, 0);
Which is also in it's own thread.
03-31-2011 09:22 AM
There isn't a HttpUtils class. Tell us what does HttpUtils.makeHttpConnection do?
03-31-2011 10:17 AM
To answer an earlier question, connection limits are documented here:
I would recommend a download server, a single Thread than handles all the downloads, rather than initiating a Thread for each download.