Wednesday, December 1, 2010
Dial Activity Using Intent
Button btPhone = (Button)v.findViewById(R.id.dialButton);
btPhone.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialPhone();
}
});
then
private void dialPhone() {
Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri
.parse("tel:9751076707"));
Activity parentAct = (Activity)this.getContext();
parentAct.startActivity(dialIntent);
}
Subscribe to:
Post Comments (Atom)
hi,
ReplyDeletei had a doubt, why should we use this line. what is the purpose?
Activity parentAct = (Activity)this.getContext();
i think directly use startActivity(dialIntent), it works!
could u pls explain me?
dude!! i need a source code!! plz
ReplyDeletei need source code of application buddy.............!!!do reply>>>>
ReplyDelete