title: Code runs but does not send an sms
body: <p>I am trying to send an SMS. The code runs but does not send any SMS. There are no bugs. Please guide what must have gone wrong.</p>
  
  <pre><code>package com.example.smsbomber;
  
  
  import android.app.Activity;
  
  import android.os.Bundle;
  import android.telephony.SmsManager;
  import android.view.Menu;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          sendSMS();
      }
  
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      public void sendSMS() {
          String phoneNumber = "00923002228885";
          String message = "Hello World!";
  
          SmsManager smsManager = SmsManager.getDefault();
          smsManager.sendTextMessage(phoneNumber, null, message, null, null);
      }
  }   
  </code></pre>