dial Phone Number - Android android.telephony

Android examples for android.telephony:Phone Number

Description

dial Phone Number

Demo Code

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {

  public static void dialPhoneNumber(Context context, String phoneNumber) {
    Intent intent = new Intent(Intent.ACTION_DIAL);
    intent.setData(Uri.parse("tel:" + phoneNumber));
    context.startActivity(intent);//from w ww  . ja v a 2  s .c  o  m
  }

}

Related Tutorials