BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 06-06-2011, 08:47 PM   #1 (permalink)
New Member
 
Join Date: Jun 2011
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default API to detect active network(WIFI or Cellular)

Please Login to Remove!

Hi

My question is if a blackberry has both WIFI and 3G enabled, which network is used to connect to the Internet ? Is it possible that any user app can establish a network connection and transfer data over any (WIFI or 3G) network at will, assuming both the networks are available.
Offline  
Old 06-06-2011, 09:34 PM   #2 (permalink)
BlackBerry Mensa
 
tsac's Avatar
 
Join Date: Mar 2005
Location: Others run out when we run in
Model: Z10
OS: 10.010219
PIN: No Pin just a Tack
Carrier: at&t
Posts: 8,414
Post Thanks: 43
Thanked 598 Times in 591 Posts
Default Re: API to detect active network(WIFI or Cellular)

Depending on your setup the BB can switch between both depending on availability.
the WiFI profile can be set to use either a cell source or local WiFi.
__________________
If someone helps, tell them by clicking the Thanks button


9810 BES
Z10 on BES
9700 BIS
Offline  
Old 06-07-2011, 12:56 PM   #3 (permalink)
New Member
 
Join Date: Jun 2011
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: API to detect active network(WIFI or Cellular)

Thanks for the reply tsac. But can you clarify that if both 3G and WIFI are available at a given instance of time, an APP can choose either 3G or WIFI as the connection medium. I know on Android and Apple, if WIFI is enabled all the APPs use WIFI only. I want to confirm that Blackberry differs in this behavior.
Offline  
Old 06-07-2011, 01:03 PM   #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 Re: API to detect active network(WIFI or Cellular)

Yes, an application developer may write the program to use what ever connection method s/he may wish (depending on user permissions and IT Policies of course). Depending on the OS BIS and BES will go via Wi-Fi when available so apps that use BIS-B or BES connections will do so as well.

That said, the easiest way to write a connected app is to not specify any particular connection and let the device choose, in which case it will behave the way you describe Andooid and iOS devices.
__________________
My other Blackberry is a PlayBook.
Offline  
The Following User Says Thank You to hrbuckley For This Useful Post:
Vanguy (06-07-2011)
Old 06-07-2011, 02:48 PM   #5 (permalink)
New Member
 
Join Date: Jun 2011
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 4
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: API to detect active network(WIFI or Cellular)

Thanks for reply 'hrbuckley'. Extending my question, is it possible to determine programatically how much data has been consumed over WIFI and how much data has been consumed over 3G.
Offline  
Old 06-07-2011, 07:52 PM   #6 (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 Re: API to detect active network(WIFI or Cellular)

No, it isn't really. Some programs make a stab at it by keeping track of how many bytes are sent/received while each connection method is available. But since an app doesn't have to use Wi-Fi just because it is available, they usually diverge from valid numbers over time.
__________________
My other Blackberry is a PlayBook.
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.