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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:24:45+00:00 2026-06-18T15:24:45+00:00

I made a java programme which call and use a xml feed from http://www.somewhereinblog.net/indexblog/rss

  • 0

I made a java programme which call and use a xml feed from http://www.somewhereinblog.net/indexblog/rss and works fine.

But when i made a android version and calling it , the program cant found the host,
because this site has a mobile version which is m.somewhereinblog.net , and whenever i try to call the feed url, it autochanges its url and go to m.somewhereinblog.net/indexblog/rss
which has no feed.

So how can i force my phone to not call the mobile version? any idea or help please

  • 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-18T15:24:46+00:00Added an answer on June 18, 2026 at 3:24 pm

    The Website is redirecting your Android program according to the User-Agent headers it receives. The workaround: send desktop User-Agent headers when retrieving the feed. Have a look at http://www.useragentstring.com/pages/useragentstring.php for an exhaustive list of User-Agent headers.

    Following your comments – here’s a clarification. When a browser connects to a webserver it sends a User-Agent string in its headers. The User-Agent identifies the client request, often specifying the Operating System, version of the browser it is using, etc.

    For instance a mobile browser running Android might identify itself as:

    User-Agent: Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
    

    Whereas a desktop browser on Windows 8 might send something like:

    User-Agent: Mozilla/6.0 (Windows NT 6.2; WOW64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1
    

    Notice in the examples above that the User-Agent contains information about the operating system and the version and name of the browser originating the request. Webservers use this information to determine which pages should be served.

    Since your program on Android is being redirected to a mobile page when requesting a feed, it is highly probable that the API you are using on Android to generate the request is sending a User-Agent string identifying it as a mobile device.

    The workaround is to override the User-Agent string which is being sent in the headers so that the webserver thinks that the request is coming from a desktop system. This is the reason why I posted the link to the list of User-Agent strings – so that you can select and test different settings.

    To sum up – you do not need to request a different URL – request the feed from the same URL as the desktop version but ensure that the User-Agent string in the headers passed to the webserver identifies the request as coming from a desktop browser and not a mobile one to avoid being redirected to the mobile version.

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

Sidebar

Related Questions

I'm trying to use sbt to compile an Android Project made in Java, which
I have made a front end for a program which test java (foo.class) binary
I have made a java application that stores data from a .csv file to
Newbie here...can I write one program which incorporates .NET LINQ and also various Java
I made a simple java program that sends bytes to the parallel port, which
I'm trying to write a java programme which determines if all the elements of
So I'm relatively new to Android (and Java). I've made a class which has
Possible Duplicate: java thread - run() and start() methods I made a program which
I made a small Java program that loads a words list from a txt
I need a java program which should give all dictionary words from the give

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.