Android Intent Create callPhone(Context context, String number)

Here you can find the source of callPhone(Context context, String number)

Description

call Phone

License

Open Source License

Declaration

public static void callPhone(Context context, String number) 

Method Source Code

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

Related

  1. callHTTPDownload(Context context, String chooserTilte, String url)
  2. constructGoogleCalendarIntentVariant1()
  3. constructGoogleCalendarIntentVariant2()
  4. createNotification(Intent resultIntent, Context current, final Class destination)
  5. getExtraObject(Activity context, String key)