title: Make USSD call in android
body: <p>To check the balance first i have to make a call <strong>*xxx#</strong> and then i get a response with the multiple options to choose from and after i input the particular number i get the balance.</p>
  
  <p>What code can i use for the same in my android app?</p>
  
  <p>Dialing <strong>*xxx*x#</strong> is giving me error.</p>
  
  <p>Below is my code which works fine for the *xxx# calls:</p>
  
  <pre><code>String encodedHash = Uri.encode("#");
  String ussd = "*" + encodedHash + lCallNum + encodedHash;
  startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ussd)));
  </code></pre>