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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 2
Registered: ‎12-19-2012
My Device: Black Berry 10
My Carrier: n/a
Accepted Solution

hasDataCoverage undefined

I am trying to determine if the device has connectivity to the internet (either to Wifi or a data network e.g. 3g)

 

However blackberry.system.hasDataCoverage is undefined

 

Development environment:

WebWorks 1.0.2.9

BB10 Dev Alpha B 10.0.9 Bundle 388

 

What is the correct way to check, without actually making a network request?

Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: hasDataCoverage undefined

Try using blackberry.connection instead:

 

blackberry.connection.type !== blackberry.connection.NONE

 

I'll look into hasDataCoverage. I suspect the docs are not correct for BB10.

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: hasDataCoverage undefined

The docs are correct - this function is only available on BBOS and PlayBook

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Retired
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: hasDataCoverage undefined

please use

navigator.online
@nukulb
Highlighted
New Contributor
Posts: 2
Registered: ‎12-19-2012
My Device: Black Berry 10
My Carrier: n/a

Re: hasDataCoverage undefined

It's actually navigator.onLine (capital L)

 

But yes this works.  

 

Thanks!

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: hasDataCoverage undefined

There is a problem with the docs because the main code example for blackberry.system is

if (!blackberry.system.hasDataCoverage()) {
       alert("You are not in coverage, we will attempt to send later");
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
Posts: 172
Registered: ‎05-01-2010
My Device: Z10
My Carrier: O2

Re: hasDataCoverage undefined


interfaSys wrote:

There is a problem with the docs because the main code example for blackberry.system is

if (!blackberry.system.hasDataCoverage()) {
       alert("You are not in coverage, we will attempt to send later");

and its still wrong in the docs. It would be much appreciated if this will be fixed



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Contributor
Posts: 35
Registered: ‎08-29-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None

Re: hasDataCoverage undefined


bert2002 wrote:

interfaSys wrote:

There is a problem with the docs because the main code example for blackberry.system is

if (!blackberry.system.hasDataCoverage()) {
       alert("You are not in coverage, we will attempt to send later");

and its still wrong in the docs. It would be much appreciated if this will be fixed


Yea, please fix the API doc.