안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
단말에 설정된 apn 값을 읽어서 종류를 알아보는 걸 하고 있습니다.
아래와 같이 하면 id, type, apn, current, numeric 의 정보를 얻을 수 있습니다.
Uri uri = Uri.parse("content://telephony/carriers"); String projection[] = {"_id,apn,type,current,numeric"}; Cursor cr = mParentContext.getContentResolver().query(uri, projection, null, null, null); while(cr!=null && cr.moveToNext()){ if( "1".equals(cr.getString(cr.getColumnIndex("current"))) ){ APN apn = new APN(); apn.apn = cr.getString(cr.getColumnIndex("apn")); apn.type = cr.getString(cr.getColumnIndex("type")); apn.numeric = cr.getString(cr.getColumnIndex("numeric")); } }
근대 현재 설정된 apn 의 종류를 알고 싶은데 이부분은 자료가 없는 것 같더라구요.
혹시 apn 종류중 현재 설정된 apn의 이름을 얻을 수 있는 방법이 있나요?