Code example for TelephonyManager

Methods: getSimOperator

0
 
    /* (non-Javadoc) 
     * @see com.wayfinder.pal.network.info.TGPPInfo#getHomeMCC() 
     */ 
    public String getHomeMCC() throws NetworkException {
    	String sim = m_telMgr.getSimOperator();
    	if (sim.length() > 4) {
    		return sim.substring(0, 3);
    	} else { 
    		return UNKNOWN;
    	} 
         
    } 
 
    /* (non-Javadoc) 
     * @see com.wayfinder.pal.network.info.TGPPInfo#getHomeMNC() 
     */ 
    public String getHomeMNC() throws NetworkException {
    	String sim = m_telMgr.getSimOperator();
    	if (sim.length() > 4) {
    		return sim.substring(3);