How to send SMS in android?

Hello,

anybody have good resources how to make an app that sends SMS? Preferrably for noobs? I want a tutorial with screen shots if possible. The first one I saw on google didn’t work. :confused:

Thank you.

use Google

Well, I wouldn’t say that I have done this but I get the code from stack exchange network, and the thread can be located over here “Show compose SMS view in Android - Stack Overflow” You can use this code to do the same

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button btnSendSMS = (Button) findViewById(R.id.btnSendSMS);
btnSendSMS.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
sendSMS(“5556”, “Hi You got a message!”);

                   /*here i can send message to emulator 5556. In Real device 
                                                           you can change number  */
      }
  });

}
//—sends an SMS message to another device—

private void sendSMS(String phoneNumber, String message)
{
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, null, null);
}

}

See if this helps you ! :slight_smile:

Have you tried google? There are a variety of tutorials online.
Here’s one with screenshots that you asked for

How to send SMS with Android? ~ icodeya

:eek: