Java tutorial
//package com.java2s; import android.content.Context; import android.telephony.TelephonyManager; public class Main { /** ------------------------------------------------------------------------ Phone Calls -- */ public static boolean deviceCanMakePhoneCall(final Context context) { if (((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number() == null) { // no phone return false; } return true; } }