private String getUserAgent() {
if (mUserAgentString == null) {
String productWithVersion = String.format("%s/%s", BuildConfig.APPLICATION_ID, BuildConfig.VERSION_CODE);
String androidUserAgent = System.getProperty("http.agent");
if (androidUserAgent == null && productWithVersion != null) {
mUserAgentString = productWithVersion; // in case null is returned
} else if (productWithVersion != null) {
mUserAgentString = String.format("%s %s", productWithVersion, androidUserAgent);
} else {
mUserAgentString = "undefined???";
}
}
return mUserAgentString;
}
com.kayako.android.k5/204 Dalvik/2.1.0 (Linux; U; Android 7.0; Android SDK built for x86_64 Build/NYC)