/**
* User-Agent
*
* @return user-agent
*/
public String getUser_Agent() {
String ua = "Android;" + getOSVersion() + ";" + getVersion() + ";"
+ getVendor() + "-" + getDevice();
return ua;
}
/**
* device model name, e.g: GT-I9100
*
* @return the user_Agent
*/
public String getDevice() {
return Build.MODEL;
}
/**
* device factory name, e.g: Samsung
*
* @return the vENDOR
*/
public String getVendor() {
return Build.BRAND;
}
/**
* @return the SDK version
*/
public int getSDKVersion() {
return Build.VERSION.SDK_INT;
}
/**
* @return the OS version
*/
public String getOSVersion() {
return Build.VERSION.RELEASE;
}
/**
* Retrieves application's version number from the manifest
*
* @return versionName
*/
public String getVersion() {
String version = "0.0.0";
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo(
getPackageName(), 0);
version = packageInfo.versionName;
} catch (NameNotFoundException e) {
e.printStackTrace();
}
return version;
}