0

I am working on an APP using Xamarin MonoTouch, this App requires custom licence key as provided by us. To identify each and every installation we have to store some kind of device information to control misuse of App.

After trying various ways, now the problems are:

Device Id or Android id : gets changed every time a device is factory reset or format.

Settings.System.GetString(this.ContentResolver, Settings.Secure.AndroidId);

IMEI Number: No SIM Tabs dont have. Double SIM phones have no fix slot wise imei and sends randomly chose one.

var telephonyManager = (TelephonyManager)GetSystemService(TelephonyService);
string imei = telephonyManager.DeviceId;

WIFI Mac Address: Good way but some sets like HTC and Chinese ones throwing exception while retrieving mac address, but works some time. SO not getting fix id everytime app starts.

WifiManager wm = (WifiManager)GetSystemService(WifiService);
string macid = wm.ConnectionInfo.MacAddress;

So everytime any of the above ID fails, user needs to re register app again and again. Do we have any fool proof way of doing this?

poupou
  • 43,413
  • 6
  • 77
  • 174
seopower
  • 127
  • 4
  • 14
  • This has been discussed in detail in the past and the consensus was there are no fool-proof ways of doing it. See this discussion: http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id – matthewrdev Apr 22 '15 at 10:01

1 Answers1

0

Ok, as per comment by Matt, since there is not fool-proof method of getting unique id from an android device. So I have made a provision of validating installations against WIFI Mac ID and Android ID both. If any one of these found matched then installation is genuine or spoofed.

seopower
  • 127
  • 4
  • 14