dial Call Direct - Android Intent

Android examples for Intent:Phone Call

Description

dial Call Direct

Demo Code


import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;

public class Main{
    //from   w  w w .  j a  va  2  s.co m
    public static void dialCallDirect(Context ctx, String phoneNum) {
        if (StringUtil.isEmpty(phoneNum)) {
            return;
        }

        Uri uri = Uri.parse("tel:" + phoneNum);
        Intent intent = new Intent(Intent.ACTION_CALL, uri);
        ctx.startActivity(intent);
    }
}

Related Tutorials