Code example for UnknownHostException

Methods: getMessage

0
			InetAddress inAddress = InetAddress.getByName(ip);
			if(inAddress.isReachable(500)) {
				return true; 
			} 
		} catch (UnknownHostException e) {
			Log.i(MainStarterActivity.class.getName(),e.getMessage());
		} catch (IOException e) {
			Log.i(MainStarterActivity.class.getName(),e.getMessage());
		} 
 
    	return false; 
    } 
 
    /** 
     * start view for user selection 
     * @param ipText - ip address 
     */ 
    private void startUserSelection(String ipText) {
    	Intent intent = new Intent(this, UserListActivity.class);
    	intent.putExtra("ipAddress", ipText);
    	intent.putExtra("wifiOn", true);