I am trying to establish the USER_AGENT in an Android application, so that it can navigate, with which I indicate it. I am using the following lines of code:
public void setUserAgent(){
DefaultHttpClient http = new DefaultHttpClient();
http.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "UserAgentPropio");
Log.e("","");
Log.e("USER AGENT : " + System.getProperty("http.agent"),"");
Log.e("","");
}
The question really branches in two:
First Is the USER_AGENT the same as it is used in HTTP and the one that is Applies to Android? , my question comes from that, on Android it is used to navigate in the WebView a specific User_Agent, but you can use another to browse the internet.
And the question I have as main.
When I do the System.getProperty(...)
I detect another one, which I do not know if I'm detecting it in the indicated way.
Greetings.