Skip to content

Commit

Permalink
Set user agenet properly
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Feb 3, 2012
1 parent 40afd22 commit a0b6ad9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/org/wikipedia/WikipediaActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ public void onCreate(Bundle savedInstanceState) {
super.loadUrl("file:///android_asset/www/index.html");
this.webViewClient = new WikipediaWebViewClient(this);
this.appView.setWebViewClient(this.webViewClient);

String currentUA = this.appView.getSettings().getUserAgentString();

this.appView.getSettings().setUserAgentString("WikipediaMobile/1.1 " + currentUA);
}

@Override
public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
// no-op!
}
}
}

0 comments on commit a0b6ad9

Please sign in to comment.