Java tutorial
//package com.java2s; import android.content.Context; import android.database.Cursor; import android.net.Uri; public class Main { private static Uri PREFERRED_APN_URI = Uri.parse("content://telephony/carriers/preferapn"); public static final String APN_PROP_APN = "apn"; public static String getApn(Context context) { Cursor c = context.getContentResolver().query(PREFERRED_APN_URI, null, null, null, null); c.moveToFirst(); if (c.isAfterLast()) { c.close(); return null; } String strResult = c.getString(c.getColumnIndex(APN_PROP_APN)); c.close(); return strResult; } }