title: How can I get android device Unique ID?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id">Is there a unique Android device ID?</a>  </p>
  </blockquote>
  
  
  
  <p>I used below code to get android device IMEI and How can I change below code to get android device Unique ID. </p>
  
  <pre><code>String getDeviceID1(TelephonyManager phonyManager){
      String id = phonyManager.getDeviceId();
      if (id == null){
          id = "not available";
      }
      int phoneType = phonyManager.getPhoneType();
      switch(phoneType){
          case TelephonyManager.PHONE_TYPE_NONE:
              return "" + id;
  
          case TelephonyManager.PHONE_TYPE_GSM:
              return "" + id;
  
          case TelephonyManager.PHONE_TYPE_CDMA:
              return "" + id;
  
          /*
          *  for API Level 11 or above
          *  case TelephonyManager.PHONE_TYPE_SIP:
          *   return "SIP";
          */
  
          default:
              return "" + id;
      }
  
      //I used to show IMEI 
  
      TextView textDeviceID = (TextView)findViewById(R.id.deviceid);
      //retrieve a reference to an instance of TelephonyManager
      TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
      textDeviceID.setText(getDeviceID1(telephonyManager));
  }
  </code></pre>