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 8235001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:39:33+00:00 2026-06-07T18:39:33+00:00

Since they changed the way we make HTTP request in the latest Android SDK,

  • 0

Since they changed the way we make HTTP request in the latest Android SDK, I have not been able to find a tutorial that shows how to make HTTP post request. Especially for login. So I would like to see a some code examples that show how to implement an HTTP post request, and deals with the cookies. And if possible, I would also like to see a code example for https://security.stackexchange.com/questions/4302/how-to-implement-a-remember-me-on-a-mobile-app Thank you.

  • 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-06-07T18:39:34+00:00Added an answer on June 7, 2026 at 6:39 pm

    Library used: http://loopj.com/android-async-http/

    private OnClickListener login = new OnClickListener() {
    
        public void onClick(View view) {
    
            AsyncHttpClient myClient = new AsyncHttpClient();
            myClient.get(URL, null);
            myClient.setCookieStore(myCookieStore);
            myClient.setCookieStore(myCookieStore);
            String username = "";
            String password = "";
            RequestParams params1 = new RequestParams();
            params1.put("username", username);
            params1.put("password", password);
            pd = ProgressDialog.show(this, "", "Signing In...");
            myClient.post(URL, params1,
                    new AsyncHttpResponseHandler() {
                        @Override
                        public void onSuccess(String response) {
                            System.out.println("response" + response);
                            pd.dismiss();
                            if (response.contains("<!--Authorized-->")) {
                            }
                            else {
                                pd.dismiss();
                                Context mContext = SigninActivity.this;
                                notMatchDialog = new Dialog(mContext);
                                notMatchDialog.setContentView(R.layout.loginfaileddialoglayout);
                                notMatchDialog.setTitle("Login failed");
                                dismissDialogButton = (Button) notMatchDialog.findViewById(R.id.dismissDialogButton);
                                dismissDialogButton.setOnClickListener(dismissDialog);
                                notMatchDialog.show();
                            }
                        }
    
                        @Override
                        public void onFailure(Throwable e, String response) {
                            // TODO Need to figure out different failures and try to help the user.
                        }
                    });
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since now I have only used plugin for editing and the way I use
I have been looking for a way to allow the user to easily change
Story: I have a lot of properties that needs to be set. Since they
I have been looking for a better way to handle this issue maybe its
So far I haven't been able to find a clear answer, though it's possible
So I'm following a tutorial on C and I'm stuck at structs since they
I can't search for a particular string, since they're all very similar, but I'd
I've recently learnt about CNS and FNS , and since they look so elegant
since memcpy should be highly optimized nowadays, does it still make sense to optimize
Since regular jQuery animations are not fluent on iOS ( .hide() , slideDown() ),

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.