title: Getting Device Info for Licensing in Android App (Xamarin)
body: <p>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.</p>
  
  <p>After trying various ways, now the problems are:</p>
  
  <p>Device Id or Android id : gets changed every time a device is factory reset or format.</p>
  
  <pre><code>Settings.System.GetString(this.ContentResolver, Settings.Secure.AndroidId);
  </code></pre>
  
  <p>IMEI Number: No SIM Tabs dont have. Double SIM phones have no fix slot wise imei and sends randomly chose one.</p>
  
  <pre><code>var telephonyManager = (TelephonyManager)GetSystemService(TelephonyService);
  string imei = telephonyManager.DeviceId;
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>WifiManager wm = (WifiManager)GetSystemService(WifiService);
  string macid = wm.ConnectionInfo.MacAddress;
  </code></pre>
  
  <p>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?</p>