Persistent storage is the problem. Sure, I could come up with randomly-generated unique ID. But anywhere I could store that ID is subject to erasure if my app is accidentally uninstalled. And if I make that ID user-accessible, then it could be spoofed and my copy protection scheme would be foiled. I am distributing my app independently of the Market because the Market places a $200 cap on the price, so I needed to develop my own copy protection. I have settled on license number keyed to a device ID, and my preferred device ID is the WiFi Mac address. If the user does not have WiFi, then I am using the AndroidID. But the AndroidID changes when the user updates his Android version, or does a hard reset. Then I have to get involved and provide the customer with a new license number. This is a bother for both me and the customer. I don't mind doing it in rare circumstances, but if I cannot reliably detect the presence of WiFi, then those circumstances will be way too common. If I do detect that they have WiFi but it is turned off, my app does ask them to turn it on so we can fetch the Mac Address. But I don't want to ask the user to turn on WiFi if his device does not have WiFi, hence my need for a reliable detection of WiFi capability.
On Feb 24, 7:20 am, Kostya Vasilyev <kmans...@gmail.com> wrote: > I don't have the answer to your original question, but... > > If you've come across devices where you can't get the mac address, > perhaps you'd consider not using it at all? > > There are several fairly reliable data pieces even without the mac, and > you could combine them into one, mix in the current timestamp just in > case, and save the result into persistent storage for later reuse. > > -- Kostya > > 24.02.2012 15:16, RLScott пишет: > > > Can anyone tell me how to determine if a device has WiFi even if that > > WiFi is turned off? > > -- > Kostya Vasilyev -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en