Code example for ConnectException

0
            } 
        } catch (UnsupportedEncodingException e) {
            throw new ConnectException(UNEXPECTED_RESPONSE_ERROR
                    + " unsupported encoding exception."); 
        } catch (JSONException e) {
            throw new ConnectException(UNEXPECTED_RESPONSE_ERROR
                    + " server didn't response success on login."); 
        } 
    } 
 
    /** 
     * Private constructor to do first instance. 
     * */ 
    private SessionManager() { 
    } 
 
    /** 
     * Get user preferences. 
     * */ 
    private void getPreferences() { 
        if (mApplicationContext != null) {