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
Developer
Posts: 73
Registered: ‎07-15-2008
My Device: Not Specified

Http connection interrupted by incoming voice call.

Hello Everyone,

 

I am using 8100 simulator to test my application. In my application, there is a login screen which takes user name and password and connects to server for the authentication. I am using HTTP connection. When I click on login button and my app start comunicating to server, at this time if I get any incoming voice call, the voice call screen is popped up and after finishing the call, again my login screen displays but can't complete the connection and returns the error after the default time out (which is 120 seconds). I again click on Login button, still it doesn't work. This happens 2 to 3 times and suddenly after 3 attempts, it starts working and can connect to server and can authenticate the user! This problem also occur on the device.

 

Can anyone pleas guide me to solve this issue?

 

Thanks,

- Rohan

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Http connection interrupted by incoming voice call.

On most networks, it is expected that voice calls interrupt network connections.  However, you should be able to make a new connection after the call has ended.  What happens in the 2-3 tries after the call?  Is an exception thrown?  If so, what is it?  What route is your connection being made over?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 73
Registered: ‎07-15-2008
My Device: Not Specified

Re: Http connection interrupted by incoming voice call.

Yes Mark,

 

That is correct that at a time we can have only one channel, either voice or data. So, it is expected that voice calls interrupt network connections.

 

I am using BES for my connection. Whenever I try to connect to the server using HTTP connection, if the server doesn't respond for 120 seconds (which is a default time out), the HTTP connection returns null and comes out of the try block. So, the same thing is happening whenever I get an incoming call at the time when some communication is going on with server. During these 2-3 tries, I just couldnt not hit the server at all and the HTTP connection returns null and comes out of the try block.

 

I tried the same thing with default browser. I tried opening www.google.com and simulated incoming call. It couldnt connect once the call is over, I had to try again and it worked second time. So, I wonder why my app needs 2-3 attempt to get the connection again?

 

 

- Rohan

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Http connection interrupted by incoming voice call.

Can you verify that you are appending ";deviceside=false" to the end or your URL?  How long are you waiting after the phone call is finished before trying to make another connection?  Or does your application keep trying to connect while the phone call is in progress?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 73
Registered: ‎07-15-2008
My Device: Not Specified

Re: Http connection interrupted by incoming voice call.

Hi Mark,

 

Yes, deviceside=false is being taken care of as I've been using it since long. The only problem is created when I got an incoming call. After the phone call is finished, my app tries to connect for the default time out which is 120 seconds. And I am displaying a dialog alert after 120 seconds saying "connection doesn not exist, try again." So, after that dialog appears, I again click on Login button, I am not able to connect. I can only connect after 2 such attempts. Or if I wait for around couple of minutes before I click on Login button again. My app doesn't try to connect while the call in progress. (In fact, it cannot connect as the data channel cannot be accessed while voice call in progress.)

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Http connection interrupted by incoming voice call.

What BlackBerry model and handheld software version are you testing on?

 

When you mentioned you were not able to reproduce this with the BlackBerry Browser, can you verify how you were testing this?  Were you manually opening the browser and loading a web page or were you invoking the browser using the BrowserSession?  The first method may not be happening quick enough to reproduce the issue.

 

Are you making your connection right after a user hangs up or after the callDisconnected method of the PhoneListener?  It does take a few seconds for the network to disconnect a call after a user hangs up, but it should be faster than a few minutes.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 73
Registered: ‎07-15-2008
My Device: Not Specified

Re: Http connection interrupted by incoming voice call.

Hi Mark,

 

I am using JDE 4.2 and testin on the 8100 simulator.

 

When I tested with BlackBerry Browser, I did it manually. I didnt use BrowserSession. And yes, you are right that if I manually check, I can't reproduce the issue.

 

Yes, I am making my connection right after a user hangs up. And because of that only this issue arrise. If I wait for some time after a user hangs up, the issue doesn't arrise at all.

 

So, does it mean, user has to wait for sometime after the call ends? Isn't there any other way, I can solve this issue?

 

 

Thanks,

- Rohan

BlackBerry Development Advisor
Posts: 15,083
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Http connection interrupted by incoming voice call.

You may have to wait a few seconds for the network to disconnect the call, however it should not be a few minutes.

 

Are you only seeing this in the BlackBerry Simulator or on a real BlackBerry as well?  If it is only with the BlackBerry Simulator it could just be a network simulation issue.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 73
Registered: ‎07-15-2008
My Device: Not Specified

Re: Http connection interrupted by incoming voice call.

[ Edited ]

Hi Mark,

 

Initially, when I was running my app on 8100 device, I suddenly got a call and that time only I came to know about that issue. And then I try to reproduce it on the simulator and the also I could see that issue.

 

Anyway, thanks a lot for your responses. So, we conclude this thread that anyhow we have to wait for some time after the call ends before trying to connect again. :smileysad:

 

 

Message Edited by Doctor on 09-30-2008 12:19 AM