I want to add a button to my app that will allow the phone to call a particular number. I also want to add message service.
try this code for calling particular number
call.setOnClickListener(new View.OnClickListener() {//here call is the button
public void onClick(View v) {
try {
String Numb = "tel:" + repphone;// repphone is phonr num
Intent intent = new Intent(Intent.ACTION_CALL, Uri
.parse(Numb));
startActivity(intent);
} catch (Exception e) {
// Modules.showLongMessage(contact.this, e.getMessage());
}
}
});