get Network Current Apn - Android Network

Android examples for Network:Network Status

Description

get Network Current Apn

Demo Code


//package com.java2s;

import android.content.Context;
import android.database.Cursor;

import android.net.Uri;

public class Main {
    public static Cursor getCurrentApn(Context context) {
        return context.getContentResolver().query(
                Uri.parse("content://telephony/carriers/preferapn"), null,
                null, null, null);//w  ww  . j  av a2 s.co  m
    }
}

Related Tutorials