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);
    }

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...