get http request UserAgent - Android User Interface

Android examples for User Interface:WebView

Description

get http request UserAgent

Demo Code


//package com.java2s;

import android.content.Context;

import android.webkit.WebView;

public class Main {
    /**//w w w  .  j ava2 s .co m
     * get http request UserAgent
     * 
     * @param context
     * @return
     */
    public static String getUserAgent(Context context) {
        return new WebView(context).getSettings().getUserAgentString();
    }
}

Related Tutorials