Hi all,
This is my first post here, and my first attempt to write something more complex than HelloWorld!
I'm writing a little app, and I need to send an SMS when a button is clicked. To do that I am using the following code.
When I install this app on my testing phone (an HTC Desire), it appears to run correctly (i.e. it doesn't crash), and it has the right permissions, but the SMS doesn't arrive on the phone I sent it to.
Can anyone let me know what I've done wrong?
Thanks!
This is my first post here, and my first attempt to write something more complex than HelloWorld!
I'm writing a little app, and I need to send an SMS when a button is clicked. To do that I am using the following code.
Code:
private OnClickListener clickListener = new OnClickListener() {
public void onClick(View v) {
String dest = deststr.getText().toString();
String msgconts = msgstr.getText().toString();
SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage(dest, null, msgconts, null, null);
}
};
Can anyone let me know what I've done wrong?
Thanks!