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

Adobe AIR Development

Reply
Regular Contributor
Posts: 51
Registered: ‎02-02-2011
My Device: Not Specified

Type of Network Connectivity available?

Sorry if there is an existing thread on this topic, I tried searching the forum using a few keywords but didn't turn anything up.

 

It's my understanding that, at launch, the Playbook will be able to connect via Wifi or via bluetooth pairing to a Blackberry handset.

 

Is there a way to determine which of these connectivity types is in use?  Ideally we would be able to detect this...

 

Did not see anything under the existing SDK API...

 

Thanks

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Type of Network Connectivity available?

hey rossman,

 

i've yet to see a way in pure ActionScript to leverage BlueTooth connectivity. it usually requires an intimediary (such as the PPS classes in the playbook's case). so until RIM provides us a way to utilize the bluetooth on the device, we cant test for it. that being said, to answer your connection there are no existing API's to check what type of connection a user has to the internet being bluetooth or WiFi. the closest thing that comes to mind is the ServiceMonitor class that checks for an active connection and whether its able to access the internet. hope that sheds some light. good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Regular Contributor
Posts: 51
Registered: ‎02-02-2011
My Device: Not Specified

Re: Type of Network Connectivity available?

Thanks for the info JRab, I suspected as much.

 

Problem for me is that the company I work for has some content which is licensed one way when using wifi, but if the device is on a 3G / mobile network the licensing is different.

 

So it is really helpful to know about this, to prevent any legal concerns related to content distribution..

 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Type of Network Connectivity available?

yeah i get what you mean. kinda makes you wonder. everything we do has some legal repercussion haha - nothing is free will anymore. it all comes down to the courts. Smiley Indifferent

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Type of Network Connectivity available?

It wouldn't necessarily be a perfect solution, but it should be possible to make some headway using a combination of NetworkInfo.networkInfo.findInterfaces() and the NetworkInterface.hardwareAddress property on the objects returned, to determine the type of interface that's active.

 

MAC addresses generally, I believe, encode some "id" about the interface, so the MAC for a PlayBook's WiFi interface may be recognizably distinct from the Bluetooth interfaces (or, eventually, USB interfaces).

 

Bit of a long shot at this point... but easy enough to test on real hardware, and for a specialized purpose like this it might even be reasonable to hardcode that kind of knowledge into the app.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!