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

  • Home
  • SEARCH
  • 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 8578477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:23:54+00:00 2026-06-11T20:23:54+00:00

I have an android application using a webview on which the user has to

  • 0

I have an android application using a webview on which the user has to log in with username and password before being redirected to the page i would like to scrape data off with jsoup. Since the jsoup thread would be a different session the user would have to login again.

Now i would like to use the cookie received from the webview to send with the jsoup request to be able to scrape my data.

The cookie is being synced with cookiesyncmanager with following code. This is basically where I am stuck cause i dont know how to read out the cookie nor how to attach it to the jsoup request. Please help? 🙂

public void onPageFinished(WebView view, String url) {

            CookieSyncManager.getInstance().sync();

The jsoup scrape I am doing after the user has logged in with something like this:

  doc = Jsoup.connect("https://need.authentication.com").get();

                Elements elements = doc.select("span.tabCount");
              Element count = elements.first();


                Log.d(TAG, "test"+(count));
  • 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-11T20:23:56+00:00Added an answer on June 11, 2026 at 8:23 pm

    I’m not an android developer but maybe you can try something like this:

    final String url = "https://need.authentication.com";
    
    
    // -- Android Cookie part here --
    CookieSyncManager.getInstance().sync();
    CookieManager cm = CookieManager.getInstance();
    
    String cookie = cm.getCookie(url); // returns cookie for url
    
    // ...
    
    // -- JSoup part here --
    // Jsoup uses cookies as "name/value pairs"
    doc = Jsoup.connect("https://need.authentication.com").header("Cookie", cookie).get();
    
    // ...
    

    I hope this helps a bit, but as i said before: im no android developer (and code isn’t tested!)

    Here’s some documentation:

    • CookieManager
    • CookieSyncManager
    • Jsoup Connection
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a android application using phonegap. I have registered certain recievers which
I have developed the android phonegap application using html page and css. But My
I have Android application which is Sales Rep application.When he using the app first
I have an Android application that has one section loading a web page within
I have android application in which for a logged facebook user to retrieve in
I have an Android application which retrieves information from the web using an AsyncTask
I have a simple application with a WebView which loads an html page. The
I am developing a android application in which it having Userguide Page, which has
I have developed the Hello World Android application using Eclipse. I can run the
I am currently developing an android application using eclipse and I already have a

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.