diff --git a/app/src/main/java/com/launchdarkly/hello_android/MainApplication.java b/app/src/main/java/com/launchdarkly/hello_android/MainApplication.java index 8bdb5f5..cb8edb8 100644 --- a/app/src/main/java/com/launchdarkly/hello_android/MainApplication.java +++ b/app/src/main/java/com/launchdarkly/hello_android/MainApplication.java @@ -38,7 +38,10 @@ public void onCreate() { .build(); } - LDClient.init(this, ldConfig, context); + // Initialize the client and wait up to 5 seconds for it to receive the latest flag + // values. If initialization does not complete within the timeout, the client is still + // returned and can be used with cached values. + LDClient.init(this, ldConfig, context, 5); } private boolean isUserLoggedIn() {