I am creating a regular HTTP connection using this code:
URLConnection cn = new URL( "http://...." ).openConnection();
cn.connect();
How do I find out the default user agent for my HTTP connection? I tried using the following codes but they all return null:
Log.d("My app", "User agent = " + cn.getRequestProperties().get("User-Agent"));
Log.d("My app", "User agent = " + cn.getHeaderField("User-Agent"));