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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:32:31+00:00 2026-06-12T17:32:31+00:00

I am working on an android application. In my app i have to open

  • 0

I am working on an android application. In my app i have to open some image and pdf from webservice.I could open the image by using following code.

                HttpGet httpRequest = new HttpGet(URL);
                httpRequest.addHeader("Accepts", "application");
                httpRequest.addHeader("User-Authentication",
                        "c2hpbmVAaWxlYWZzb2x1dGlvbnMuY29tOnNoaW5laWxlYWY=");

                HttpClient httpclient = new DefaultHttpClient();
                HttpResponse response = (HttpResponse) httpclient
                .execute(httpRequest);

ANd now I have to open pdf in a webview.So I write the folowing code

WebView mWebView=new WebView(MyPdfViewActivity.this);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);


HashMap<String, String> map = new HashMap<String, String>();

map.put("Accepts", "application");
map.put("User-Authentication", "c2hpbmVAaWxlYWZzb2x1dGlvbnMuY29tOnNoaW5laWxlYWY=");
mWebView.loadUrl(URL,map);

But I am getting authentication header is not available error. Because of this problem my project is stuck. I find a same type problem here.
check this answer here the accepted answer is “You would need to fetch the page yourself (e.g., via HttpClient) and load it into the WebView that way”. How Can I do this?.
Please help me to fix the issue friends.

  • 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-12T17:32:32+00:00Added an answer on June 12, 2026 at 5:32 pm

    Look into the documentation.

    additionalHttpHeaders

    The additional headers to be used in the HTTP request for this URL, specified as a map from name to value. Note that if this map contains any of the headers that are set by default by this WebView, such as those controlling caching, accept types or the User-Agent, their values may be overriden by this WebView's defaults.

    Probably your User-Authentication header is also overriden.

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

Sidebar

Related Questions

I am working on an Android application.In my app I have to use images
I have the following problem: I am working on an Android application where at
I am working with an Android application. In my app I have to change
I am working on a new android application.In my app i have to add
Now I am working on a Android application. In my app i have to
Our team is working on Android Application back ended with App Engine. We have
I am working on an android application. In my app I am using nottification.
I am working on an ANdroid application.In my app I have to list all
I am working on an Android application.In my app I have change the textview
I'm working with FlashBuilder 4.6 to develop Android app. In the application there is

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.