Example usage for android.telephony TelephonyManager getVoiceMailAlphaTag

List of usage examples for android.telephony TelephonyManager getVoiceMailAlphaTag

Introduction

In this page you can find the example usage for android.telephony TelephonyManager getVoiceMailAlphaTag.

Prototype

@SuppressAutoDoc 
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
public String getVoiceMailAlphaTag() 

Source Link

Document

Retrieves the alphabetic identifier associated with the voice mail number.

Usage

From source file:Main.java

/**
 * Gets the voicemail tag from Telephony Manager.
 * @param context Current application context
 * @return Voicemail tag, the alphabetic identifier associated with the voice mail number.
 */// w  w  w.  j  a  va  2s  . co m
public static String getVoiceMailAlphaTag(Context context) {
    final TelephonyManager telephonyManager = (TelephonyManager) context
            .getSystemService(Context.TELEPHONY_SERVICE);
    final String voiceMailLabel = telephonyManager.getVoiceMailAlphaTag();
    return voiceMailLabel;
}