Skip to content Skip to sidebar Skip to footer

Warning/error Meaning - Gbarequest - Gbarequest: Constructor Called 222 Useragent Apache-httpclient/unavailable

W/System.err(27207): [DEBUG] GbaRequest - GbaRequest: Constructor Called 222 userAgent Apache-HttpClient/UNAVAILABLE (java 1.4) Thank you in advance for the assistance. I wasn't

Solution 1:

That is not an error itself, Apache-HttpClient/UNAVAILABLE (java 1.4) is the default User Agent string for your Apache HttpClient.

This happens when you don't send the User Agent ("User-Agent:") via HTTP headers, then the phone GBA Service warn you about that.

If you want send the default system User Agent you can do

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

this should be like

 Dalvik/1.6.0 (Linux; U; Android 4.2.2; Galaxy Nexus Build/JDQ39)

or if you want sent a custom User Agent you can do

httpClient.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "My user agent");

or you can set the header via setHeader method

requestOrPost.setHeader("User-Agent", USER_AGENT);

Post a Comment for "Warning/error Meaning - Gbarequest - Gbarequest: Constructor Called 222 Useragent Apache-httpclient/unavailable"