10-25-2012 07:19 AM
I am building an application that stream radio channels from different URL's. The streaming works pretty fine over the WIFI network mode. But when we try to stream the radio using GPRS/BIS data plans the player does not work. I am seeking help from the sample code provided on BB forums i.e. http://supportforums.blackberry.com/t5/Java-Develo
Does anybody have idea what technique to follow to stream via GPRS mode.
11-15-2012 05:59 AM
can anybody tell me the solution for the same
11-15-2012 08:34 AM
From talking to other people who do this, the solution appears to be in these lines from the referenced article:
"... transport methods that are used by wireless service providers, such as Wireless Application Protocol (WAP/WAP2) or Transmission Control Protocol (TCP)"
So I think you need to use WAP or Direct TCP, by specifying the appropriate suffix:
For TCP/IP the APN specification is an issue because, unless you know the APN settings based on the network, then you are going to have to get your users to enter the correct value in the TCP Options, or in configuration options for your app.
Does this help?
11-15-2012 11:36 PM
Thanks for your feedback Peter.
According to your suggestion i have already appended the appropiate suffix . Even set the APN settings.
I have used this method to append the suffix .
private static String getConnectionString(){
String connectionString="";
if(WLANInfo.getWLANState()==WLANInfo.WLAN_STATE_CO NNECTED){
connectionString="?;interface=wifi";
}
else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS){
connectionString = "?;&deviceside=false";
}
else if((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT)==CoverageInfo.COVERA GE_DIRECT){
String carrierUid=getCarrierBIBSUid();
if(carrierUid == null) {
connectionString = "?;deviceside=true";
}
else{
connectionString = "?;deviceside=false?;connectionUID="+carrierUid + "?;ConnectionType";
}
}
else if(CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE) {
}
return connectionString;
}
But still no luck on GPRS or BIS plan.Can you provide me any other altenative??
11-16-2012 04:36 AM
Your code looks fine but I note there is a "?" in your connectionString that I would not expect to be there:
="?;interface=wifi";
would be
=";interface=wifi";.
Can you test the connection logic on the device by just using ti to get a single page via an http connection?
11-16-2012 05:21 AM
yes "?" is there but it does not create any problem . I try removing"?" but still no luck.
Peter this means that streaming will not work on BIS/GPRS plan?
You have any idea?
11-16-2012 06:40 AM
The short answer is I don't know. But it would surprise me if it did not work.
From what you have told us so far, I don't know if there is a general problem or a bug in your code.
As a test, you could try downloading something like Nobex and test that. I know that this app has been around a long time and they have talked about streaming over various connections, so that would be a good test.