Android HTTP User Agent

To complete the accepted answer, if you want the default user agent use System.getProperty(“http.agent”)

client.getParams().setParameter(CoreProtocolPNames.USER_AGENT,
                                System.getProperty("http.agent"));

Leave a Comment