import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class Phonecall extends Activity { /** Called when the activity is first created. */ EditText edittext1; Button button1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); edittext1=(EditText)findViewById(R.id.editText1); button1=(Button)findViewById(R.id.button1); button1.setOnClickListener(new OnClickListener(){ @Override public void onClick(View arg0) { String number=edittext1.getText().toString(); Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:9550053947"+number)); startActivity(callIntent); } }); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)