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

Web and WebWorks Development

Reply
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Establishing Data Connection Type

Hi

 

I'm trying to work out what kind of data connection i have. My app may want to upload large files which we only want our users to do via a WiFi connection so they aren't incurring large data plan bills. So i want to be able to tell if someone has a 3G connection or if they have a Wifi Connection available for data.

 

If i use blackberry.network api i just get a string "3GPP, WIFI" regardless of if the wifi and mobile network elements are on and connected or not... this api seems to reflect if the phone has these capabilities and not if it has those capabilities at the current moment in time.The blackberry.system.hasDataCoverage does tell me if the device as a data connection but since it's just a boolean not which type of connection (i.e. 3g, edge or wifi etc). The doc says you can use this api in conjunction with the blackberry.network api to work out which connection but since it just returns 3GPP, WIFI ALL the time i don't see how this is possible.

 

Can anyone else tell me if they've managed this kind of thing?

 

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Establishing Data Connection Type

Are you seeing this returned on a physical device or the simulator?
Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Establishing Data Connection Type

I'm seeing this on a real device (torch os 6). I just got the os5 test device back last thing today's from out sales guys so can test it on that tomorrow.
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Establishing Data Connection Type

I've just tried it on the OS5 real device and that one currently doesn't even have the sim in and when i query blackberry.network i get 3GPP, CDMA, Wi-Fi back as the response. Again it seems to be what the device is capable of not what its currently using.
Highlighted
Regular Contributor
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: Establishing Data Connection Type

*bump* any ideas?