title: How can I get the UUID of my Android phone in an application?
body: <p>I'm looking for help to get the UUID of my Android phone. I have searched the net and found one potential solution but it is not working in the emulator.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>Class&lt;?&gt; c;
  try {
      c = Class.forName("android.os.SystemProperties");
      Method get = c.getMethod("get", String.class);
      serial = (String) get.invoke(c, "ro.serialno");
      Log.d("ANDROID UUID",serial);
  } catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>Does anybody know why it isn't working, or have a better solution?</p>