In my Android ap开发者_运维知识库plications I would like to check if the APN settings set is the preferred APN.
Can I have a list of APN in android?
You could try this list of APN's, it is from CyanogenMod 6.
http://github.com/CyanogenMod/android_vendor_cyanogen/blob/573afdd74db101ee6f20f3bd1c9976648414c834/prebuilt/common/etc/apns-conf.xml
Key thing is the content provider URI: "content/telephony/carriers".
Please check this example of APN list handling:
code example
The preferrede access point name depends on the network provider. You don't really want a list of APN's for all the phone companies in the whole world...?
You have two databases, on keeps list of all the APN's that can be used, and second is preferred APN. Construct your list from one, and get preferred APN from another.
精彩评论