How to get the default HTTP USER AGENT and its default settings from the android device?

thanks  

Nohsib
['https://Stackoverflow.com/questions/6824604', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/530993/']
When you use web view to access the user-agent, make sure you run the 

`new WebView(this).getSettings().getUserAgentString();`

on the UI thread.

If you want access the user agent on background thread.
use

`System.getProperty("http.agent")`

To check whether a user-agent is valid or not use this
<https://deviceatlas.com/device-data/user-agent-tester>
An alternative

```
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
    String userAgent = WebSettings.getDefaultUserAgent(context);
}

```