I have my android app with Edittext , Button
Edittext : to allow the user to enter the number he wants . Button : called "Call" to make the call .
and i want a way to get the exact date and time of the call after it finishes
my java code :
public String string; public String number = null; //
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button CallButton = (Button)findViewById(R.id.button1);
CallButton.setOnClickListener(this);
}
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
EditText txtcallnumber = null;
txtcallnumber = (EditText)findViewById(R.id.callEdit);
string = txtcallnumber.getText().toString();
number = "tel:" +string ;
Intent CallIntent = new Intent (Intent.ACTION_CALL,Uri.parse(number));
startActivity(CallIntent);
}
how can i do that ?
thanks in advance
0 comments:
Post a Comment