Update user agent

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-10-24 17:58:29 +02:00
parent cabd38d75d
commit 744fc8dffd

View file

@ -22,9 +22,7 @@ package com.nextcloud.talk.api.helpers.api;
import android.net.Uri;
import com.nextcloud.talk.BuildConfig;
import com.nextcloud.talk.R;
import com.nextcloud.talk.api.models.RetrofitBucket;
import com.nextcloud.talk.application.NextcloudTalkApplication;
import java.util.HashMap;
import java.util.Map;
@ -35,9 +33,10 @@ public class ApiHelper {
private static String ocsApiVersion = "/ocs/v2.php";
private static String spreedApiVersion = "/apps/spreed/api/v1";
private static String userAgent = "Mozilla/5.0 (Android) Nextcloud-Talk v";
public static String getUserAgent() {
return NextcloudTalkApplication.getSharedApplication().getResources().getString(R.string.nc_app_name) +
" Android v" + BuildConfig.VERSION_NAME;
return userAgent + BuildConfig.VERSION_NAME;
}
public static RetrofitBucket getRetrofitBucketForContactsSearch(String baseUrl, String searchQuery) {