android firebase Remote config: device does not receive test variant

409 Views Asked by At

I cannot get my Android device to receive a test variant during the AB experiment.

What i did

In Firebase admin panel, I created a variable with this value:

enter image description here

And created an AB test with three variants:

enter image description here

Then I got an instance token as per docs:

FirebaseInstallations.getInstance().getToken(/* forceRefresh */true)
            .addOnCompleteListener(new OnCompleteListener<InstallationTokenResult>() {
              @Override
              public void onComplete(@NonNull Task<InstallationTokenResult> task) {
                if (task.isSuccessful() && task.getResult() != null) {
                  Log.d("Installations", "Installation auth token: " + task.getResult().getToken());
                  promise.resolve(task.getResult().getToken());
                } else {
                  Log.e("Installations", "Unable to get Installation auth token");
                }
              }
            });

and added it to my test devices list:

enter image description here

What happened

However, after rebooting the app (I also cleaned the cache and force-stopped it just in case it cached something) it still receives the original default value:

...
Map<String, Object> responseMap = new HashMap<>(2);
responseMap.put("result", result);
responseMap.put("constants", module.getConstantsForApp(FirebaseApp.DEFAULT_APP_NAME));
Log.d("REMOTECONFIG", responseMap.toString());
...

in the logs:

10-04 10:25:12.886 16964 16964 D REMOTECONFIG: {result=true, constants={minimumFetchInterval=43200, fetchTimeout=60, values={testValue=Bundle[{source=remote, value=somedefault}]}, lastFetchTime=1601796312020, lastFetchStatus=success}}

Why is that? what am I missing? I doublechecked my token, verified it with jwt.io, it is valid and not expired.

0

There are 0 best solutions below