Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:18:47+00:00 2026-05-29T05:18:47+00:00

My app posts some strings to my server. It use HttpClient to send datas.

  • 0

My app posts some strings to my server.
It use HttpClient to send datas.
All functions are perfect without 1 problem..

If My phone is on networking state then
I click submit button -> Datas can be send on my server. (real very well)

If My phone is unnetworking(disconneing) state (it means not using wifi or 3g…)
I click submit button -> It showing up Error Dialog as ‘You have to check network’

But Problem is…
As soon as(about in 0.5~1.5 seconds) I click wifi enable button then I click submit button,
The HttpClient post execution showing up exception problem.(FC)
Can I control the exception problem?
I want showing up error dialog but, The exception, I can’t control.
I think during wifi is enabling (or 3g), the execution something happen problems.

This is error sentence

02-06 00:48:41.250: E/AndroidRuntime(20183): Caused by: java.lang.IllegalStateException: Manager is shut down.

The Source

(...ready for setting params, and string datas..and so on)

            HttpPost httpPost = new HttpPost(url);
            try {
                httpPost.setEntity(mpEntity);
                httpPost.addHeader("cookie", cookie);

                //↓This execute is problem. How can I control exception?
                HttpResponse response = httpClient.execute(httpPost);

                HttpEntity resEntity = response.getEntity();
                InputStream content = resEntity.getContent();
                return content;
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            } catch (ClientProtocolException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
            httpClient.getConnectionManager().shutdown();
            return null;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:18:48+00:00Added an answer on May 29, 2026 at 5:18 am

    I think the problematic line is

            httpClient.getConnectionManager().shutdown();
    

    This is the original Apache documentation, without more code (and the full stack trace) is difficult to understand what’s going on. I think it’s just bad API usage

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app, I have send some Request to server using POST Method and
I have this android app that posts (http post) some data strings to my
I've some problem with the design of my app, especially opening assets from a
Hi i need to post some data to a web server from windows phone
I am writing a small app that retrieves some html from a web server
Is it possible to Post some data from window based app to a web-server
I have a Rails app that will post some data to another Rails app.
I would like to post-process my app.config file and perform some token replacements after
I have a simple web app with users and posts. I have an index
Say I have a blogging app in Django. How can i re-order the posts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.