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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:09:20+00:00 2026-06-06T05:09:20+00:00

I am trying to get local cookies (file://) to work on android 3.1+ within

  • 0

I am trying to get local cookies (file://) to work on android 3.1+
within ChildBrowser. I found a blog response talking about this
specific issue and how to remedy it with Cookie Manager. I can’t
figure out where in the plugin to put the code. Has anyone
successfully implemented this?


Comment Below from http://code.google.com/p/android/issues/detail?id=3739

Comment 16 by edtechk…@gmail.com, Feb 1, 2012
I got this thing working, for Android 2.2, javascript’s
document.cookie works fine, just make sure that in your
Webview…javascript is enabled like so:

yourWebViewVariable.getSettings().setJavaScriptEnabled(true);

for Android 3.1 just add this to your java file onLoadInit:

CookieManager.setAcceptFileSchemeCookies(true);   //This is the line that specifically makes it work so the other lines is optional

CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.acceptCookie();
  • 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-06T05:09:21+00:00Added an answer on June 6, 2026 at 5:09 am

    For those interested, I figured it out. It is not a Childbrowser issue at all. You have to make the parent Phonegap project accept local cookies and then Childbrowser will too.
    To do so, You should have a file called youappname.java in your PhoneGap project, probably with this contents or similar:

    import android.os.Bundle;
    import org.apache.cordova.*;
    
    public class App extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
    }
    

    Modify it to look like this example:

    import android.os.Bundle;
    import android.webkit.CookieManager;
    import org.apache.cordova.*;
    
    public class App extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        CookieManager.setAcceptFileSchemeCookies(true);
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get the network file page e.g. smb://server.local/tech/file.pdf You can see this
I'm trying to get a local HTML file to display within a WebBrowser in
I'm trying to get the local IP address of my Android device using Mono
why would I get this error when trying to do a local install of
I'm trying to get a dump from MySQL to my local client. This is
trying to get length of file which from local storage. File exists 100% (because
I'm trying to get my local dev django app to work after following these
I'm trying to get Symfony 2.0.14 running at my local PC but get this
I'm trying to get my Android.mk file to optimize the binaries: LOCAL_PATH := $(call
I am trying to get a list of local network computers. I tried to

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.