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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Contributor
shujaathussain
Posts: 14
Registered: ‎01-10-2011

How to identify a network?

Hello guys!

 

How can I identify a network(Transport)? For example I have detected a WIFI network and I want to give it some friendly name and save it locally so that in future if this netwrok is detected, It may connect directly to it.

 

I looked into TransportDecriptor. I can get CID and UID. But I think these are for local service record.

 

Anybody please guide me.

 

Thanks in Advance

 

 

Shujaat

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009

Re: How to identify a network?

Have a look into RadioInfo API.

Please use plain text.
Contributor
shujaathussain
Posts: 14
Registered: ‎01-10-2011

Re: How to identify a network?

Thanks for the quick reply. Since I am a beginner in BB world,  if you can tell me about any sample code or something else that may help me.

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009

Re: How to identify a network?

Try with...

RadioInfo.getNetworkName(RadioInfo.getCurrentNetworkIndex());

.. it returns an String.

Please use plain text.
Contributor
shujaathussain
Posts: 14
Registered: ‎01-10-2011

Re: How to identify a network?

I tested it. On simulator it returns "Default CDMA Network".

 

I don't want to be spoonfed but here is what I want:

 

  • Displaying a list of available Wifi Networks
  • Saving it locally with a friendly name(Associating a friendly name with a network). I ll save it in a vector.
  • In future if this network is detected, it should connect to it.

 

The problem is how to find available wifi networks and what is the unique parameter that identifies these.

 

If you can please provide code for finding available wifi networks and tell me the way to find uniqueness in these, I ll be greatful to you.

Please use plain text.
Developer
ibarrera
Posts: 588
Registered: ‎05-29-2009

Re: How to identify a network?

Then you can also try to find something in this forum, like for example...

 

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-scan-for-available-networks-for-devic...

Please use plain text.