Sunday, February 26, 2012

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

You have seen this post? (I assume so..)

http://android-developers.blogspot.com/2011/03/identifying-app-installations.html

This is important enough that someone should turn this into a library,
perhaps I will soonish?

As for whether or not the MAC is available, I believe that it may be
that it is available if the user has activated wifi during the time
they've had the phone on, but perhaps not available if they haven't
turned on the wifi since the device was booted. (This is a little
more than complete guess as I haven't read that code, but I feel like
that's what the answer might be from my experience with this...)

kris

On Fri, Feb 24, 2012 at 9:26 AM, RLScott <fixthatpiano@yahoo.com> wrote:
> 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+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
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