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: 18
Registered: ‎03-01-2010
My Device: None
My Carrier: NOne

Displaying a Wifi Indicator in the Titlebar

I would like to display a wifi indicator in the titlebar similar to the browser app. Is there a function/setting to do this?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Displaying a Wifi Indicator in the Titlebar

[ Edited ]

 

You may have to "fake" this in your own application. You could use the following code to see if its on or not:

 

if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_CARRIER,RadioInfo.WAF_WLAN, false)){
coverageWiFi = true;
wifiLog.addlog("Coverage Status: Online");

}

 

If WIFI is turned on, you then show your icon, if it isn't then don't show it.

 

Get your logo here:

 

http://www.allfreelogo.com/logo/wifi-logo.html

 

Source: http://supportforums.blackberry.com/t5/Java-Development/How-to-identify-whether-wifi-connection-is-c...

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Contributor
Posts: 18
Registered: ‎03-01-2010
My Device: None
My Carrier: NOne

Re: Displaying a Wifi Indicator in the Titlebar

[ Edited ]

That won't work for updating the logo, but looking at the docs I see that you can add a listener. Thanks for the link to the logo. All free logos is a horrible site though, its as though their site designer was given the challenge to cover every inch in ads. I still need to figure out how to add an image to the right side of the field. Will read more docs.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Displaying a Wifi Indicator in the Titlebar

[ Edited ]

As far as I know, CoverageInfo.COVERAGE_CARRIER has alsmost nothing to do with pure Wi-Fi coverage. CoverageInfo.COVERAGE_CARRIER is set in the Wi-Fi case only after the OS tests the Wi-Fi network and establishes some secret property (probably that the gateway IP address and port(s) specified in the Wi-Fi TCP/IP Transport/Browser Service Book records are reachable). You can see that CoverageInfo.COVERAGE_CARRIER is never set if you connect to a private WLAN having no Internet access, however, your app will still be able to access hosts reachable from that WLAN.

 

The proper check is to query WLANInfo.getWLANState(). You could also query whether the WLAN interface is enabled or not (doesn't mean it's connected to an AP) using the RadioInfo class. Last but not least, you can subscribe to changes in WLANInfo.getWLANState() using WLANInfo.addListener().

Contributor
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

Re: Displaying a Wifi Indicator in the Titlebar

hi,

i have to implement the same thing i.e. the wifi indicator but also need to show the exact logo as displyed on the device top right corner. Also, i need to update this logo as in when when strength increases/decreses, i need to update the logo strenght too.

 

PLease guide me over it. i am aware of the listners but how do i create the logo and update it too. do i need to actually draw the logo at runtime??

 

Thanks in advance. looking forward for some help

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Displaying a Wifi Indicator in the Titlebar

Does this help?

 

http://supportforums.blackberry.com/t5/Java-Development/How-To-Implement-a-TitleBar-with-Signal-Stre...

 

Probably does more than you want, but you can just cut/paste the code you need. 

 

 

Contributor
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

Re: Displaying a Wifi Indicator in the Titlebar

I tried this but no success. do we have nay other way of diong so?

please help. i am so new to j2me.