Sunday, March 4, 2012

[android-developers] Re: Does a device have Wi-Fi or not?

The Parrot Asteroid is a prime example.  It does have BT, however, so instead of using the WiFi MAC address I use the BT MAC address as part of the unique identifier.

On Tuesday, February 21, 2012 5:55:39 PM UTC-5, RLScott wrote:
I may have found a problem in using the Wi-Fi Mac Address as a unique
device id.  If the Wi-Fi is turned off, I can detect that OK and ask
the user to turn it on, provided I know that the device has Wi-Fi.  I
have been using
PackageManager.hasSystemFeatures(PackageManager.FEATURE_WIFI) to
determine this, and then resort to an inferior backup scheme in the
rare cases where the devices does not have Wi-Fi capability.  However
I have evidence that some devices are returning FALSE even though they
have Wi-Fi, if that Wi-Fi happens to be turned off.  This evidence is
only circumstantial based on the number of times my app has had to
fall back to the inferior backup scheme for device id.

Can anyone confirm whether this is really true?  If you boot up your
device with Wi-Fi off, does
PackageManager.hasSystemFeatures(PackageManager.FEATURE_WIFI) return
FALSE?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment