hi Nithin,
i also guess the same thing because of that what i did was i create a
very simple application. it also sends 2 sms's. this is really
frustration.
this the application
package com.sms;
import android.app.Activity;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.widget.Toast;
public class sms extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
try {
sendSMS("772376937", "Randika");
Toast.makeText(sms.this, "SMS Sent",
Toast.LENGTH_LONG).show();
} catch (Exception e) {
// TODO Auto-generated catch block
Toast.makeText(sms.this, e.getMessage(),
Toast.LENGTH_LONG).show();
}
}
public void sendSMS(String number, String msg) throws Exception{
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, msg, null, null);
}
}
regards,
Randika
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en