Skip to content

Commit d940889

Browse files
committed
removed second initialize
1 parent 2e94705 commit d940889

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

raven-android-sdk/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020
minSdkVersion 21
2121
targetSdkVersion 30
2222
versionCode 1
23-
versionName "1.0.3"
23+
versionName "1.0.4"
2424

2525
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2626
consumerProguardFiles 'consumer-rules.pro'
@@ -49,6 +49,9 @@ dependencies {
4949
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
5050
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
5151
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
52+
53+
debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
54+
releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
5255
}
5356

5457
// Because the components are created only during the afterEvaluate phase, you must
@@ -64,7 +67,7 @@ afterEvaluate {
6467
// You can then customize attributes of the publication as shown below.
6568
groupId = 'com.raven'
6669
artifactId = 'raven-android-sdk'
67-
version = '1.0.3'
70+
version = '1.0.4'
6871
}
6972
}
7073
}

raven-android-sdk/src/main/java/com/raven/ravenandroidsdk/RavenSdk.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ object RavenSdk {
2222
const val RAVEN_NOTIFICATION_ID = "raven_notification_id"
2323

2424
/*
25-
Method to initialize Raven SDK when you want to trigger raven events via SDK.
2625
Invoke on app launch
2726
*/
2827
@Throws(IllegalArgumentException::class)
@@ -33,18 +32,6 @@ object RavenSdk {
3332
}
3433

3534

36-
/*
37-
Method to initialize Raven SDK when you do not want to trigger raven events via SDK.
38-
Invoke on app launch
39-
*/
40-
@Throws(IllegalArgumentException::class)
41-
fun initialize(context: Application, appId: String) {
42-
initPrefs(context, appId)
43-
ApiProvider(context)
44-
fetchCurrentUser()
45-
}
46-
47-
4835
/*
4936
Set user identifier.
5037
Invoke once on login to set the user identifier

raven-android-sdk/src/main/java/com/raven/ravenandroidsdk/api/ApiProvider.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.raven.ravenandroidsdk.api
22

33
import android.content.Context
44
import com.google.gson.GsonBuilder
5+
import com.readystatesoftware.chuck.ChuckInterceptor
56
import okhttp3.Interceptor
67
import okhttp3.OkHttpClient
78
import okhttp3.Request
@@ -39,7 +40,7 @@ internal class ApiProvider(context: Context) {
3940
val interceptor = HttpLoggingInterceptor()
4041
interceptor.apply { interceptor.level = HttpLoggingInterceptor.Level.BODY }
4142
val httpClient = OkHttpClient.Builder().callTimeout(15, TimeUnit.SECONDS)
42-
// httpClient.addInterceptor(ChuckInterceptor(app.applicationContext))
43+
httpClient.addInterceptor(ChuckInterceptor(app.applicationContext))
4344

4445
if (secretKey != null) {
4546
httpClient.addInterceptor(object : Interceptor {

0 commit comments

Comments
 (0)