title: How to get IMEI in Android using code
body: <p>I am trying to get IMEI of a phone by running this android code     </p>
  
  <pre><code>String imei="*#06#";//Checking the Phone's IMEI.
  Intent cintent= new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+Uri.encode(imei)));
  startActivity(cintent);
  </code></pre>
  
  <p>I have set the permission as required   </p>
  
  <pre><code>  &lt;uses-permission android:name="android.permission.CALL_PHONE"/&gt;
  </code></pre>
  
  <p>But am getting this feedback on my phone "Connection problem or invalid MMI code".
  Where did I go wrong? Thanks</p>