Example usage for android.telecom TelecomManager EXTRA_PHONE_ACCOUNT_HANDLE

List of usage examples for android.telecom TelecomManager EXTRA_PHONE_ACCOUNT_HANDLE

Introduction

In this page you can find the example usage for android.telecom TelecomManager EXTRA_PHONE_ACCOUNT_HANDLE.

Prototype

String EXTRA_PHONE_ACCOUNT_HANDLE

To view the source code for android.telecom TelecomManager EXTRA_PHONE_ACCOUNT_HANDLE.

Click Source Link

Document

The extra used with an android.content.Intent#ACTION_CALL and android.content.Intent#ACTION_DIAL Intent to specify a PhoneAccountHandle to use when making the call.

Usage

From source file:com.mobileglobe.android.customdialer.common.CallUtil.java

/**
 * Return an Intent for making a phone call. Scheme (e.g. tel, sip) will be determined
 * automatically.//ww  w  . j  a va2  s  .c  o m
 */
@RequiresApi(api = Build.VERSION_CODES.M)
public static Intent getCallWithSubjectIntent(String number, PhoneAccountHandle phoneAccountHandle,
        String callSubject) {

    final Intent intent = getCallIntent(getCallUri(number));
    intent.putExtra(TelecomManager.EXTRA_CALL_SUBJECT, callSubject);
    if (phoneAccountHandle != null) {
        intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, phoneAccountHandle);
    }
    return intent;
}