Example usage for android.content Intent ACTION_DIAL

List of usage examples for android.content Intent ACTION_DIAL

Introduction

In this page you can find the example usage for android.content Intent ACTION_DIAL.

Prototype

String ACTION_DIAL

To view the source code for android.content Intent ACTION_DIAL.

Click Source Link

Document

Activity Action: Dial a number as specified by the data.

Usage

From source file:Main.java

public static Intent getPhoneIntent() {
    Intent phoneIntent = new Intent(Intent.ACTION_DIAL);
    phoneIntent.setData(Uri.parse("tel:+1234567890"));
    return phoneIntent;
}

From source file:Main.java

public static Intent newTelIntent(String telurl) {
    Intent intent = new Intent(Intent.ACTION_DIAL);
    // FIXME : need to check XXX is really a short number in tel:XXX 
    intent.setData(Uri.parse(telurl));//from  w  ww. j a va  2 s  .  c o m
    return intent;
}

From source file:Main.java

public static Intent getDialIntent(String phoneNumber) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber));
    return intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}

From source file:Main.java

public static Intent newCallNumberIntent(String number) {
    return new Intent(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + number)));
}

From source file:Main.java

public static void openDail(Context getContext) {
    Intent intent = new Intent(Intent.ACTION_DIAL);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    getContext.startActivity(intent);/*from ww  w  . j  a  v  a  2 s.c  o  m*/
}

From source file:Main.java

public static void dial(Context context, String tel) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + tel));
    context.startActivity(intent);/*from  w ww  .  j  av  a 2 s . c o m*/
}

From source file:Main.java

public static void call(String number, Context context) {
    Intent intent = new Intent(Intent.ACTION_DIAL);
    intent.setData(Uri.parse("tel:" + number));
    context.startActivity(intent);//w  w w  .j  a  va 2s  . c  o m
}

From source file:Main.java

public static void call(Context context, String tel) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + tel));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);//w w w  .j a  v  a 2s .  co  m
}

From source file:Main.java

public static void call(Context context, String phone) {
    Intent callIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phone));
    context.startActivity(callIntent);/*from  ww w. j a  v  a 2 s .co  m*/
}

From source file:Main.java

public static void CallPhone(Context context, String phone) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phone));
    context.startActivity(intent);//from w ww.j a v  a2  s. c  o  m
}