-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Hello,
We are using this Android SDK on a Kotlin application to control experiments and features for thousands of devices which have bandwidth restrictions. We want to control when the datafile updated, so we are not using polling to prevent wasting bandwidth. The issue here is that this SDK will download the datafile every time the client is initialized.
The methods provided do not allow initializing the manager without downloading cache file. The following method,
android-sdk/android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyManager.java
Line 178 in 7139c21
| protected OptimizelyClient initialize(@NonNull Context context, @Nullable String datafile, boolean downloadToCache) { |
is prepared to receive a flag to decide if it should download or not, but there is no path where this is called with the value
false. We think this method should have been public, instead of protected.
There are two alternatives to this, which are:
- Creating a custom DatafileHandler, which will block certain request, but since using your methods to download the cache files, this would be tricky requiring changing some flags or something to know if we are initializing and blocking those, which feels like too much on an hack
- Call that initialization method with reflection, which is not really ideal, but is the solution we are using right now
Is there any alternative? What is the recommended approach for this? Would it be possible to make that method public?
Thank you