return apn; }
/**
* @param apn the apn to set */
public void setApn(String apn) { this.apn = apn; }
/**
* @return the proxy */
public String getProxy() { return proxy; }
/**
* @param proxy the proxy to set */
public void setProxy(String proxy) { this.proxy = proxy; }
/**
* @return the port */
public String getPort() { return port; }
/**
* @param port the port to set */
public void setPort(String port) { this.port = port; }
/**
* @return the user */
public String getUser() { return user; }
/**
* @param user the user to set */
public void setUser(String user) { this.user = user; }
/**
* @return the server */
public String getServer() { return server; }
/**
* @param server the server to set */
public void setServer(String server) { this.server = server; }
/**
* @return the password */
public String getPassword() { return password; }
/**
* @param password the password to set */
public void setPassword(String password) { this.password = password; }
/**
* @return the mmsc */
public String getMmsc() { return mmsc; }
/**
* @param mmsc the mmsc to set */
public void setMmsc(String mmsc) { this.mmsc = mmsc; }
/**
* @return the mmsproxy */
public String getMmsproxy() { return mmsproxy; }
/**
* @param mmsproxy the mmsproxy to set */
public void setMmsproxy(String mmsproxy) { this.mmsproxy = mmsproxy; }
/**
* @return the mmsport */
public String getMmsport() { return mmsport; }
/**
* @param mmsport the mmsport to set */
public void setMmsport(String mmsport) { this.mmsport = mmsport; }
/**
* @return the mcc */
public String getMcc() { return mcc; }
/**
* @param mcc the mcc to set */
public void setMcc(String mcc) { this.mcc = mcc; }
/**
* @return the mnc */
public String getMnc() { return mnc; }
/**
* @param mnc the mnc to set */
public void setMnc(String mnc) { this.mnc = mnc; }
/**
* @return the numeric */
public String getNumeric() { return numeric; }
/**
* @param numeric the numeric to set */
public void setNumeric(String numeric) { this.numeric = numeric; }
/**
* @return the type */
public String getType() { return type; }
/**
* @param type the type to set */
public void setType(String type) { this.type = type;
} }
如果里面的函数名不清楚的话,网上找APN设置,一大堆的资料
3.主界面里的代码为:
public class ApnNew extends Activity { private Button setbtn; private Button insertbtn; private Button apnexist;
@Override
public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.apnnew);
setbtn = (Button)this.findViewById(R.id.setApn); setbtn.setOnClickListener(setlis);
insertbtn = (Button)this.findViewById(R.id.insertApn); insertbtn.setOnClickListener(insertlis);
apnexist = (Button)this.findViewById(R.id.Apnexist); apnexist.setOnClickListener(existlis); }
private OnClickListener setlis = new OnClickListener(){
@Override
public void onClick(View v) { setCmwapAPN(); } };
private OnClickListener insertlis = new OnClickListener(){
@Override
public void onClick(View v) { InsetAPN();
if(apnd_id != 0)
Toast.makeText(ApnNew.this, String.valueOf(apnd_id), Toast.LENGTH_SHORT).show(); else