Here is the final xml: XML
Here is a download for the library: Droidprism.jar
Javadoc: Carrier.html APN.html
Usage:
First add Jsoup to the build path.
import com.droidprism.*; Carrier c = Carrier.getCarrier("US","Verizon"); if(c != null) { String smsemail = c.getsmsemail(); String mmsemail = c.getmmsemail(); System.out.println(smsemail + " " + mmsemail); //prints vtext.com vzwpix.com com.droidprism.APN apn = c.getAPN(); if(apn != null) { String mmsc = apn.mmsc; String mmsproxy = apn.proxy; //"" if none String mmsport = apn.port; //0 if none System.out.println(mmsc +" " + mmsproxy + " " + mmsport); //prints http://mms.vtext.com/servlets/mms 0 } }
You can also get the carrier from android with mcc and mnc codes:
TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String networkOperator = tel.getNetworkOperator(); if (networkOperator != null) { int mcc = Integer.parseInt( networkOperator.substring(0, 3)); String s = networkOperator.substring(3); //remove leading zeroes int mnc = Integer.parseInt( s.replaceFirst("^0{1,2}","")); Carrier c = Carrier.getCarrier(mcc, mnc); c.getsmsemail(); APN a = c.getAPN(); }