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

Java Development

Reply
Regular Contributor
Posts: 68
Registered: ‎03-17-2010
My Device: 9000,9500,8900
My Carrier: Airtel,Vodafone
Accepted Solution

Problem in downloading video file in wap2Connection

Hello,

 

I develop an application that downloads and video from web service and stores in sd card.

I use bb 8900 and 9000 with Vodaphone india and airtel as data plan respectively.

 

I have to check the video downloading functionality for both wi-fi and wap2

 

for wifi the application is running fine but i'm facing problem with wap 2 connection.

 

Actually the application tries to connect to server twice

 

1. to check registration (This utility works fine with wap2 connection and wi-fi both)

2. to download videos (This utility works only with wi-fi not with wap2)

 

the url generates for video downloading is looks like this

 

http://servername/videofolder/resolutionfolder/filename.mp4;ConnectionUID=WAP2trans

 

and when i try to connect the server for video file downloading i just found that connection is null;

 

What does this means?

And how can I establish connection with server via wap2 connection?

 

Thanks in advance.

 

Developer
Posts: 159
Registered: ‎08-19-2008
My Device: Not Specified

Re: Problem in downloading video file in wap2Connection

You are not able to connect via WAP-2 because u didn't read ServiceBOOk  settings for  WAP-2

 

You need to read service book for making WAP-2 connection in INDIA...............Please refer to peter_strange board's message of networking connection ..............You will get info for all types of connection over there.....................

Developer
Posts: 159
Registered: ‎08-19-2008
My Device: Not Specified

Re: Problem in downloading video file in wap2Connection

Regular Contributor
Posts: 68
Registered: ‎03-17-2010
My Device: 9000,9500,8900
My Carrier: Airtel,Vodafone

Re: Problem in downloading video file in wap2Connection

As you have said

 

 


ankit2grover wrote:

You are not able to connect via WAP-2 because u didn't read ServiceBOOk  settings for  WAP-2

 

You need to read service book for making WAP-2 connection in INDIA...............Please refer to peter_strange board's message of networking connection ..............You will get info for all types of connection over there.....................


But I am able to connect via WAP2 when I try to check registration. And at that time the connection is successfully established. Problem occurs only when the mp4 file is downloaded.
And yes I read service book record every time. This ;ConnectionUID=WAP2trans is not hardcoded.
And that's why I'm confused for wap2 connection.

 

 

Developer
Posts: 159
Registered: ‎08-19-2008
My Device: Not Specified

Re: Problem in downloading video file in wap2Connection

Check for settings on mp4 file on server ...........as you are getting connection = null so it seems that you are not able to make connection to your mp4file.............or you can convert mp4 file into bytes & then try to download that byte content.............i implement my video application in this way

Regular Contributor
Posts: 68
Registered: ‎03-17-2010
My Device: 9000,9500,8900
My Carrier: Airtel,Vodafone

Re: Problem in downloading video file in wap2Connection

[ Edited ]

As you have said

 

Check for settings on mp4 file on server ...........

 

Exactly what to look for mp4 file settings? Can you give me more details on this?

 

And According to you

 

.............or you can convert mp4 file into bytes & then try to download that byte content............

 

Do you mean that i convert that file before I start downloading?

 

How can I do that if I can not connect with that file?

 

 

Regular Contributor
Posts: 68
Registered: ‎03-17-2010
My Device: 9000,9500,8900
My Carrier: Airtel,Vodafone

Re: Problem in downloading video file in wap2Connection

Ok friends I find out the solution.

 

Actually to download the file connection was created twice. And the second connection downloads the file. And when I try to connect second time I was returned to another service book record that is mostly null.or "wap2 trans" so the connection is not created.

 

Any how I manage it that if that I do not found "wap2trans" i rescan the service book and if I can't find out it in 3 tries I return exception that is handled later. As application demands.

 

Thaks for your all suggestions.

 

Highlighted
Regular Contributor
Posts: 59
Registered: ‎03-01-2011
My Device: Not Specified

Re: Problem in downloading video file in wap2Connection

I am also trying to download video file using bufferplaybackdemo sample of jde 5.0 but all the time it saving o byte file .. can u pls provide me ur code