View

Saturday 2 June 2012

Dial Application

How to USE Dial the Number in Android

Its a simple default Android api to use the Dial the number .
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + num_et.getText())));

Here i used 1 Edit text for typing the Number and 1 button to make a cal options.
Button cal_btn;
EditText num_et;
public void onClick(View v) {
   
if(num_et!=null ){
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + num_et.getText()))); 
     }
   
   }
  });
Dont forgot to give the cal permission like:
<uses-permission android:name="android.permission.CALL_PHONE" />