I realize a sublist for example when a user clicks on an available balance message will be sent to the server in the background but the problem it gives me the sms application appel function if (position==4){ Boitedialog.bloc=8; i1 =new Intent(this, EnvoiSms.class); startActivity(i1); } function sms import android.app.Activity; import android.os.Bundle; import android.telephony.SmsManager; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast;
public class EnvoiSms extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.sms); Button btnEnvoie = (Button)findViewById(R.id.envoyer); final EditText numero =(EditText)findViewById(R.id.numero); final EditText message = (EditText)findViewById(R.id.message); btnEnvoie.setOnClickListener(new OnClickListener() { public void onClick(View v) { String num ="sms://" + 87012; String msg ="S"; if(num.length()>= 4 && msg.length() > 0){ SmsManager.getDefault().sendTextMessage(num, null, msg, null, null); numero.setText(""); message.setText(""); }else{ Toast.makeText(EnvoiSms.this, "Enter le numero et/ou le message", Toast.LENGTH_SHORT).show(); } } }); } } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en