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
Copy file name to clipboardExpand all lines: docs/sdks/client-sdks/android/initialization.mdx
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,48 @@ CompletableFuture<EppoClient> eppoClientFuture = new EppoClient.Builder("YOUR_SD
112
112
113
113
The initialization methods, `buildAndInit` and `buildAndInitAsync` return or resolve to an `EppoClient` instance with a loaded configuration.
114
114
115
+
### Mobile Polling
116
+
117
+
The SDK can be configured to poll the Eppo API periodically to get the latest configuration.
118
+
119
+
<ApiOptionRef
120
+
name="pollingIntervalMs"
121
+
type="long"
122
+
defaultValue="null"
123
+
>
124
+
125
+
Maximum amount of time to wait between calls to the API for the latest configuration.
126
+
</ApiOptionRef>
127
+
128
+
<ApiOptionRef
129
+
name="pollingJitterMs"
130
+
type="long"
131
+
defaultValue="-1"
132
+
>
133
+
134
+
Limit to the amount of randomized difference in length of each polling interval. A value `-1` triggers the default, which is 10% of the `pollingIntervalMs`.
135
+
</ApiOptionRef>
136
+
137
+
138
+
When enabling polling, it is important to tie into the application's lifecycle to pause and resume pollings
139
+
140
+
```java
141
+
// Tie into the activity's lifecycle and pause/resume polling where appropriate.
142
+
143
+
@Override
144
+
publicvoid onPause() {
145
+
super.onPause();
146
+
EppoClient.getInstance().pausePolling();
147
+
}
148
+
149
+
@Override
150
+
publicvoid onResume() {
151
+
super.onResume();
152
+
EppoClient.getInstance().resumePolling();
153
+
}
154
+
155
+
```
156
+
115
157
### Assignment Logger Schema
116
158
117
159
The SDK will invoke the `logAssignment` function with an `Assignment` object that contains the following fields:
0 commit comments