title: How can I determine if my Android application is running in an AVD
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2799097/how-can-i-detect-the-android-emulator">How can I detect the Android emulator?</a>  </p>
  </blockquote>
  
  
  
  <p>Is there a way to reliably and programatically determine if my app is running on an AVD vs. real hardware?</p>
  
  <p>Previously I've had good luck checking MAC addresses, but I'm not sure if AVD's all have the same first AA:BB:CC portion (like stock VMWare or VirtualBox Virtual Machines do).</p>
  
  <p>I use a lot of Log.i() calls while learning to code Android Java. But this logging will murder a real phone (and is just rude to waste the user's space and resources). I figure I could wrap my Logging like this pseudo-code:</p>
  
  <pre><code>public void Loggy(String s)
  {
    if (!DEVELOPER) return true;
  
    Log.i(MYAPP,s);
  }
  </code></pre>
  
  <p>I've searched and the closest I see are people asking the same question but for iPhone.</p>