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
New Contributor
Posts: 5
Registered: ‎04-24-2012
My Device: BlackBerry Curve 9360
My Carrier: TATA DOCOMO

Issue with BrowserField :: Error Message : Could not select proper Transport Descriptor

Issue with BrowserField :: Error Message : Could not select proper Transport Descriptor

 

I have made a simple application in which there is just one BrowserField which loads http://www.google.com

 

--------------------

BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
BrowserField browserField = new BrowserField(myBrowserFieldConfig);

add(browserField);
browserField.requestContent("http://www.google.com");

--------------------

 

Steps for reproducing the error:

1. Wipe the test device.

2. Select device = BlackBerry 8520 for simulator

3. Run application from Eclipse

4. Launch Application in the simulator

5. You should get the error (image is attached)

6. Re-launch the application in simulator (using the same installed build)

7. You will not get any error!!!

 

Finding:

The same build gives error on the first launch after cleaning the simulator device and never give any error on subsequent launch.

Developer
Posts: 96
Registered: ‎06-05-2012
My Device: Developer
My Carrier: Developer

Re: Issue with BrowserField :: Error Message : Could not select proper Transport Descriptor

Hi nigam,

You can use this,
BrowserFieldConfig bfc = new BrowserFieldConfig();
bfc.setProperty(BrowserFieldConfig.CONNECTION_FACTORY, cf);

//////here cf is a connection factory/////
then set proper descriptor for connection factory by using

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


thanks,


Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Issue with BrowserField :: Error Message : Could not select proper Transport Descriptor

[ Edited ]

its a network related issue. 

I will suggest before using above code, check your device network connection also.

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.