Here you can find the source of callPhone(Context context, String number)
public static void callPhone(Context context, String number)
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.Intent; import android.net.Uri; public class Main { public static void callPhone(Context context, String number) { if (null == context) { return; }/* www . j a v a 2s . c om*/ Intent intent = new Intent(); intent.setAction(Intent.ACTION_CALL); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setData(Uri.parse("tel:" + number)); context.startActivity(intent); } }