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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:24:22+00:00 2026-06-12T20:24:22+00:00

I’m trying to post data to Google docs from my phone in Android, but

  • 0

I’m trying to post data to Google docs from my phone in Android, but whenever I send the request, I get back a strange html (not error) page.

If I copy/paste the same url that I generate on the device into my desktop browser, it works just fine (I’m using Postman so it’s not a Post/Get verb error).

My guess is that Google docs is recognizing my device as an Android device and redirecting my request to the Android google docs page. Any way to stop this from happening?

Here is my code:

HttpClient httpclient = new DefaultHttpClient();

        try {
              HttpPost httppost = new HttpPost("https://docs.google.com/macros/exec?" +
                    "service=..." +
                    "&Param1=" + java.net.URLEncoder.encode(param1, "ISO-8859-1"));

              Log.v("Request", httppost.getURI().toString());

              InputStream localInputStream = httpclient.execute(httppost).getEntity().getContent();
              byte bytes[] = new byte[20000];
              localInputStream.read(bytes);

              Log.e("LOG", new String(bytes));

        } catch (ClientProtocolException e) {
            // TODO Auto-generated catch block
        } catch (IOException e) {
            // TODO Auto-generated catch block
        }

And here is the page I get back:

10-14 14:27:39.749: E/html(15814): <!DOCTYPE html>
10-14 14:27:39.749: E/html(15814): <html lang="en">
10-14 14:27:39.749: E/html(15814):   <head>
10-14 14:27:39.749: E/html(15814):   <meta charset="utf-8">
10-14 14:27:39.749: E/html(15814):   <title>Welcome to Google Docs</title>
10-14 14:27:39.749: E/html(15814): <style type="text/css">
10-14 14:27:39.749: E/html(15814):   html, body, div, h1, h2, h3, h4, h5, h6, p, img, dl,
10-14 14:27:39.749: E/html(15814):   dt, dd, ol, ul, li, table, tr, td, form, object, embed,
10-14 14:27:39.749: E/html(15814):   article, aside, canvas, command, details, fieldset,
10-14 14:27:39.749: E/html(15814):   figcaption, figure, footer, group, header, hgroup, legend,
10-14 14:27:39.749: E/html(15814):   mark, menu, meter, nav, output, progress, section, summary,
10-14 14:27:39.749: E/html(15814):   time, audio, video {
10-14 14:27:39.749: E/html(15814):   margin: 0;
10-14 14:27:39.749: E/html(15814):   padding: 0;
10-14 14:27:39.749: E/html(15814):   border: 0;
10-14 14:27:39.749: E/html(15814):   }
10-14 14:27:39.749: E/html(15814):   article, aside, details, figcaption, figure, footer,
10-14 14:27:39.749: E/html(15814):   header, hgroup, menu, nav, section {
10-14 14:27:39.749: E/html(15814):   display: block;
10-14 14:27:39.749: E/html(15814):   }
10-14 14:27:39.749: E/html(15814):   html {
10-14 14:27:39.749: E/html(15814):   font: 81.25% arial, helvetica, sans-serif;
10-14 14:27:39.749: E/html(15814):   background: #fff;
10-14 14:27:39.749: E/html(15814):   color: #333;
10-14 14:27:39.749: E/html(15814):   line-height: 1;
10-14 14:27:39.749: E/html(15814):   direction: ltr;
10-14 14:27:39.749: E/html(15814):   }

... and so on.
  • 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-12T20:24:24+00:00Added an answer on June 12, 2026 at 8:24 pm

    I’m guessing they determine if it’s a phone by the user agent string. Find a user agent for the browser that worked for you and use the following link to change it.

    Change user agent

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when I
I'm trying to create an if statement in PHP that prevents a single post
I have a view passing on information from a database: def serve_article(request, id): served_article
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

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.