BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-07-2010, 02:09 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2009
Model: 7100T
PIN: N/A
Carrier: java
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default WiFi hotspot availability

Please Login to Remove!

Hi to all,

i want to check that wifi hotspot are available or not at particular time using apis. according to that i have to take the action.In JDE 5.0 there are the HotSpot classes but i am not able to find the appropriate api to check the hotspot availability. can somebody help me to findout the api to check for wifi hotspot availability. all suggestions will be greatly appreciated.

with thanx and regards
shakeel
Offline  
Old 01-07-2010, 09:41 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

I usually use something like this:
Code:
    static boolean isWiFiAvailable() {
        return CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_DIRECT, RadioInfo.WAF_WLAN, true);
    }
If that returns true then I append ";interface=wifi" to the connection URI.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 01-08-2010, 12:41 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2009
Model: 7100T
PIN: N/A
Carrier: java
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default WiFi hotspot availability

hi,
thanx for ur reply hrbuckley,
whartever u are telling i have already tried to implement it in my code and tried to run my application on simulator. but the method

CoverageInfo.isCoverageSufficient(CoverageInfo.COV ERAGE_DIRECT, RadioInfo.WAF_WLAN, true);


is returning false on the simulator while the default wifi profile is active. i had also tried with the CoverageInfo.COVERAGE_MDS arguement in the above api and MDS is also running.with that arguement also that api is returning false.
Is it the correct way? or is there any other way to check the wifi hotspot/network availability.

any other suggestions?

with thanx and regards
shakeel
Offline  
Old 01-08-2010, 10:09 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Quote:
Originally Posted by syedshakeel2004 View Post
hi,
thanx for ur reply hrbuckley,
whartever u are telling i have already tried to implement it in my code and tried to run my application on simulator. but the method

CoverageInfo.isCoverageSufficient(CoverageInfo.COV ERAGE_DIRECT, RadioInfo.WAF_WLAN, true);


is returning false on the simulator while the default wifi profile is active. i had also tried with the CoverageInfo.COVERAGE_MDS arguement in the above api and MDS is also running.with that arguement also that api is returning false.
Is it the correct way? or is there any other way to check the wifi hotspot/network availability.

any other suggestions?

with thanx and regards
shakeel
This from the Blackberry Support forums:
Quote:
The BlackBerry Simulators do not support Wi-Fi connections. You can simulate a direct TCP connection or use the MDS Simulator to simulate a connection through a BlackBerry Simulator.



However, the BlackBerry Simulator does not accurately simulate network transfer speeds.
Mark Sohm
BlackBerry Development Advisor
BlackBerry - BlackBerry Developer Zone
__________________
My other Blackberry is a PlayBook.
Offline  
Old 01-09-2010, 12:58 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Dec 2009
Model: 7100T
PIN: N/A
Carrier: java
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default WiFi hotspot availability

hi,

thanx for ur reply hrbuckley,


in the simulator there is simulate options in menu bar. Then there is option of simulate network properties. then we can change the coverage status of default WLAN network by checking and unchecking that one. in the starting it is checked and after that i am running my application to check wifi network availability using

CoverageInfo.isCoverageSufficient(CoverageInfo.COV ERAGE_DIRECT, RadioInfo.WAF_WLAN, False);

then this method is returning false.

So my question is that can't we check in this way for the wi-fi network on the simulator.
and if it is right way then it is retuning false, instead it should return true?


thanx and regards
shakeel
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.