You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add this to your app's `build.gradle` file's `dependencies` element.
@@ -149,6 +149,19 @@ Any registered `Observer` will be called with the final authentication and subsc
149
149
* We refresh these tokens automatically in the background before they're invalidated.
150
150
* The subscription information gets validated as well on every token refresh.
151
151
152
+
### Recovering from network errors
153
+
154
+
Sometimes we encounter an error state while refreshing the tokens in the background due to bad or no internet connection.
155
+
156
+
You will notice this because the `state` switched to `Error`. This state object contains a reference to the original exception that was thrown.
157
+
158
+
Since we don't monitor the device's connection state you need to tell the SDK that the network connection has been reestablished / improved. We will then refresh and revalidate the user's authentication tokens.
159
+
160
+
```kotlin
161
+
contentPass.recoverFromError()
162
+
```
163
+
164
+
152
165
### Counting an impression
153
166
To count an impression, call either the suspending function `countImpressionSuspending(context: Context)` or
154
167
the compatibility function `countImpression(context: Context, callback: CountImpressionCallback)`.
0 commit comments