diff --git a/app/src/main/java/org/zotero/android/api/module/ApiWebSocketModule.kt b/app/src/main/java/org/zotero/android/api/module/ApiWebSocketModule.kt index d99a564..65e78e0 100644 --- a/app/src/main/java/org/zotero/android/api/module/ApiWebSocketModule.kt +++ b/app/src/main/java/org/zotero/android/api/module/ApiWebSocketModule.kt @@ -5,6 +5,7 @@ import dagger.Provides import dagger.hilt.migration.DisableInstallInCheck import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor.Level +import org.zotero.android.api.ClientInfoNetworkInterceptor import org.zotero.android.api.HttpLoggingInterceptor import org.zotero.android.api.NetworkConfiguration import org.zotero.android.api.annotations.ForWebSocket @@ -20,12 +21,14 @@ object ApiWebSocketModule { @Singleton @ForWebSocket fun provideSocketOkHttpClient( - configuration: NetworkConfiguration + configuration: NetworkConfiguration, + clientInfoNetworkInterceptor: ClientInfoNetworkInterceptor, ): OkHttpClient { return OkHttpClient.Builder() .addInterceptor(HttpLoggingInterceptor.createInterceptor(Level.BODY)) .setNetworkTimeout(configuration.networkTimeout) .pingInterval(5, TimeUnit.SECONDS) + .addInterceptor(clientInfoNetworkInterceptor) .build() } } \ No newline at end of file diff --git a/app/src/main/java/org/zotero/android/api/module/WebDavModule.kt b/app/src/main/java/org/zotero/android/api/module/WebDavModule.kt index 5467254..142c443 100644 --- a/app/src/main/java/org/zotero/android/api/module/WebDavModule.kt +++ b/app/src/main/java/org/zotero/android/api/module/WebDavModule.kt @@ -7,6 +7,7 @@ import okhttp3.ConnectionPool import okhttp3.Dispatcher import okhttp3.OkHttpClient import okhttp3.logging.HttpLoggingInterceptor.Level +import org.zotero.android.api.ClientInfoNetworkInterceptor import org.zotero.android.api.HttpLoggingInterceptor import org.zotero.android.api.WebDavAuthNetworkInterceptor import org.zotero.android.api.annotations.ForWebDav @@ -25,6 +26,7 @@ object WebDavModule { @ForWebDav fun provideWebDavOkHttpClient( webDavAuthNetworkInterceptor: WebDavAuthNetworkInterceptor, + clientInfoNetworkInterceptor: ClientInfoNetworkInterceptor, ): OkHttpClient { val connectionPool = ConnectionPool( maxIdleConnections = 10, @@ -41,6 +43,7 @@ object WebDavModule { .setNetworkTimeout(15L) .addInterceptor(webDavAuthNetworkInterceptor) .addInterceptor(HttpLoggingInterceptor.createInterceptor(Level.BODY)) + .addInterceptor(clientInfoNetworkInterceptor) .build() } diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 34b565c..03f93ba 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -4,7 +4,7 @@ object BuildConfig { const val compileSdkVersion = 34 const val targetSdk = 34 - val versionCode = 91 // Must be updated on every build + val versionCode = 92 // Must be updated on every build val version = Version( major = 1, minor = 0,