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
Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom
Accepted Solution

hasDataCoverage fails for Playbook WebWorks

Hi

 

Should 'hasDataCoverage' work for Blackberry Playbook Simulator (beta 2) ?

I'm using the WebWorks SDK .. and get error message: "you are not in coverage, try to add cities later"

 

Do I need to enable something else, or is this feature not enabled on the playbook simulator.

 

Thanx, H.

 

PS: Not sure if there is another place to post Playbook & Webworks related queries - there's no Tablet OS section for webdev, only for AdobeAir

 

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

Re: hasDataCoverage fails for Playbook WebWorks

[ Edited ]

According to the API reference for WebWorks on PlayBook that API should be there:

 

http://www.blackberry.com/developers/docs/webworks/api/playbook/

 

It will return true if the PlayBook has an active WiFi connection.

 

All WebWorks related questions should be posted in the web forum Smiley Happy

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: hasDataCoverage fails for Playbook WebWorks

Thanx Tim

 

Guess you're right - the API is there and is working - problem is that it returns false ..

 

Thus maybe my question should have been - how do I configure the playbook simulator network configuration. Or what is the default simulator configuration and can I change this configuration on the simulator.

 

I assumed that since I can access webresources outside of the simulator (my web app content is external), that the network is enabled - and thus hasDataCoverage should return true.

 

Will try and query current network config.

 

tnx, H.

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: hasDataCoverage fails for Playbook WebWorks

When I print blackberry.network it says "undefined" ..

 

Not sure if this value is supported by playbook simulator - or if its meant to be undefined when no WiFi configured.

 

Again - is it possible to somehow enable network on playbook simulator ?

 

.H

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

Re: hasDataCoverage fails for Playbook WebWorks

hasDataConnection returns true if there is at least one active network interface on the PB. It works fine on a real device. For some reason, the simulator always returns false. It could be because of the VMware virtual network bridge .

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 37
Registered: ‎01-18-2011
My Device: Huron 8800
My Carrier: IM3

Re: hasDataCoverage fails for Playbook WebWorks

So, is there any way to simulate network behavior in PlayBook simulator? Or should we just assume that return value as TRUE in the simulator environment?

Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: hasDataCoverage fails for Playbook WebWorks

 

I just ignore value for now - until next release ..

 

Thought my network wasn't active because hasDataCoverage returned false, but XMLHttpRequest query seems to work,  just failing somewhere down the line when I try and get results.

 

Anyhow will figure it out.

 

tnx, H.