In my app i have used Looj library (AsynHttpClient) to get response from the server its working fine with http link on android 5.0 but when i changed link to https then its only working on android 7.0 and newer versions. Even i have tried to log the issues on android 5.0 but onSuccess and onFailure methods also not get call in android 5.0. App is working perfectly on android 7.0 and newer versions of android. Below is my login function please have a look.

public static void funLogin(final String userName, final String password, final ResponseListener listener) {

    client.addHeader("Username", userName);
    client.addHeader("Password", password);
    client.addHeader("AuthToken", AUTH_TOKEN);

    client.get(BASE_URL + LOGIN, new JsonHttpResponseHandler() {

        public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
            super.onSuccess(statusCode, headers, response);

            try {
               CommonUtils.userDetailBeans.add(new Gson().fromJson(jsonArray.get(0).toString(), UserInfoModel.UserDetailBean.class));
            } catch (JSONException e) {


        public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
            super.onFailure(statusCode, headers, responseString, throwable);



App needs to work also on Android kitkat,Loolipop and Mashmallow.

0 Answers