Skip to content

Commit

Permalink
Update user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Girondel committed Sep 14, 2018
1 parent a0909c2 commit 252407a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/org/traccar/client/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class MainApplication extends Application {
public void onCreate() {
super.onCreate();
System.setProperty("http.keepAliveDuration", String.valueOf(30 * 60 * 1000));
String userAgent = String.format("Traccar/%s (SDK %s), %s", BuildConfig.VERSION_NAME,
Build.VERSION.SDK, System.getProperty("http.agent"));
System.setProperty("http.agent", userAgent);

migrateLegacyPreferences(PreferenceManager.getDefaultSharedPreferences(this));

Expand Down

0 comments on commit 252407a

Please sign in to comment.