title: Device identifier of Android emulator
body: <p>I want to test in the emulator an app that depends of the device identifier (ANDROID_ID).</p>
  
  <p>I currently obtain device identifier with the following code:</p>
  
  <pre><code>final String deviceID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
  </code></pre>
  
  <p>When I run this in an emulator it returns <code>null</code>, which gives me all sort of problems. It seems that higher Android versions it returns something.</p>
  
  <p>Is there a way to get a device identifier in the Android emulator? Am I obtaining the device id wrongly?</p>
  
  <p>Maybe it's possible to set the device identifier of the emulator through the console?</p>