12-19-2012 12:55 PM
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?
Solved! Go to Solution.
12-19-2012 02:35 PM
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.
12-19-2012 02:39 PM
The docs are correct - this function is only available on BBOS and PlayBook
12-19-2012 02:44 PM
12-19-2012 03:31 PM
It's actually navigator.onLine (capital L)
But yes this works.
Thanks!
01-18-2013 08:23 PM
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");
04-10-2013 03:29 PM
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 ![]()
a month ago
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.