02-09-2011 05:07 PM
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...
02-09-2011 05:39 PM
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!
02-09-2011 07:51 PM
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..
02-09-2011 07:54 PM
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.
04-01-2011 11:44 PM
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.