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: 374
Registered: ‎04-07-2010
My Device: Bold 9000
My Carrier: Airtel

Inconsistency connecting through EDGE/GPRS

[ Edited ]

Hello Everyone!!

 

I have written this code for http connection quite a while ago for OS 5.

 

The problem with this code is that it only sometimes works with EDGE/GPRS but always works fine with Wifi... I don't get the problem...
With EDGE/GPRS the value of conD is returned null in 99 out of 100 times...

int[] preferredTransportTypes = { TransportInfo.TRANSPORT_TCP_WIFI, TransportInfo.TRANSPORT_MDS, TransportInfo.TRANSPORT_WAP2, TransportInfo.TRANSPORT_WAP,TransportInfo.TRANSPORT_TCP_CELLULAR,TransportInfo.TRANSPORT_BIS_B};

			ConnectionFactory factory = new ConnectionFactory();
			factory.setPreferredTransportTypes(preferredTransportTypes);

			TransportDescriptor[] transports = TransportInfo.getAvailableTransports();
			System.out.println(transports.length + " Found");
			System.out.println("Just B4:" + url);
			ConnectionDescriptor conD = factory.getConnection(url);
			System.out.println("conD Value");
			System.out.println(String.valueOf(conD));

 

Someone can please tell the problem with the code...??

Thanks in advance...

 

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Developer
Posts: 374
Registered: ‎04-07-2010
My Device: Bold 9000
My Carrier: Airtel

Re: Inconsistency connecting through EDGE/GPRS

Any one, who can shed some light on what the problem might be??

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Developer
Posts: 374
Registered: ‎04-07-2010
My Device: Bold 9000
My Carrier: Airtel

Re: Inconsistency connecting through EDGE/GPRS

bump

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S
Developer
Posts: 374
Registered: ‎04-07-2010
My Device: Bold 9000
My Carrier: Airtel

Re: Inconsistency connecting through EDGE/GPRS

I think I am facing the same situationas discussed in this thread:

http://supportforums.blackberry.com/t5/Java-Development/Network-API-5-0-Vs-Network-Type-doesn-t-alwa...

 

Please can any one suggest me a solution to it ??

and If it's not the case, please help me find the problem.

Thanks in Advance.

Press the Like button (Thumb up) on the left side to thank and
please mark the Thread as solved if its solved...
K.S