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
Highlighted
Contributor
Posts: 14
Registered: ‎01-10-2011
My Device: Not Specified

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

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: How to identify a network?

Have a look into RadioInfo API.

Contributor
Posts: 14
Registered: ‎01-10-2011
My Device: Not Specified

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.

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: How to identify a network?

Try with...

RadioInfo.getNetworkName(RadioInfo.getCurrentNetworkIndex());

.. it returns an String.

Contributor
Posts: 14
Registered: ‎01-10-2011
My Device: Not Specified

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.

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

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...