fetch
or fetchAndActivate
promises never resolve/fail. It's working fine on iOS, but on Android it just gets stuck. Here is my bootstrap:
import makeRemoteConfig from '@react-native-firebase/remote-config'
const remoteConfig = makeRemoteConfig()
remoteConfig
.setDefaults({
someValue: {},
})
.then(() =>
remoteConfig
.fetchAndActivate()
.then(activated => {
//This is never called
if (!activated) console.log('Remote Config not activated')
})
.catch(() => {
//This is never called
}),
)
Calling setDefaults
resolves just fine, but after calling fetch
/fetchAndActivate
nothing happens.
I can't see anything on logcat and even tried debugging the native project. Seems like module.fetchAndActivate().addOnCompleteListener
never executes the callback
Fresh project built with react-native init
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:
# N/A
#### `AppDelegate.m`:
// N/A
Click To Expand
#### Have you converted to AndroidX? - [x] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath('com.android.tools.build:gradle:3.5.0')
classpath('com.google.gms:google-services:4.2.0')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
#### `android/app/build.gradle`:
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true);
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.movet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10
versionName "0.1.1"
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply plugin: 'com.google.gms.google-services'
#### `android/settings.gradle`:
rootProject.name = 'test'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
#### `MainApplication.java`:
package com.test;
import androidx.multidex.MultiDexApplication;
import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
/**
* Loads Flipper in React Native templates.
*
* @param context
*/
private static void initializeFlipper(Context context) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
#### `AndroidManifest.xml`:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:exported="true"/>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
Click To Expand
**`react-native info` output:**
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 115.13 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
Yarn: 1.13.0 - ~/.nvm/versions/node/v10.15.1/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v10.15.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: ^16.10.2 => 16.10.2
react-native: ^0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
- **Platform that you're experiencing the issue on**:
- [ ] iOS
- [x] Android
- [ ] **iOS** but have not tested behavior on Android
- [ ] **Android** but have not tested behavior on iOS
- [ ] Both
- **`react-native-firebase` version you're using that has this issue:**
- `6.0.2`
- **`Firebase` module(s) you're using that has the issue:**
- `@react-native-firebase/remote-config`
- **Are you using `TypeScript`?**
- `N`
Think react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
React Native Firebase
and Invertase
on Twitter for updates on the library.Are you using any other modules - have the successfully connected to your Firebase project on Android?
Also, just to confirm can you change your code to the following (you aren't returning the promise & the catch statement may swallow the error in your example):
import makeRemoteConfig from "@react-native-firebase/remote-config";
const remoteConfig = makeRemoteConfig();
remoteConfig
.setDefaults({
someValue: {}
})
.then(() => remoteConfig.fetchAndActivate())
.then(activated => {
console.log("Activated?", activated);
})
.catch(error => console.error(error));
These are all the modules I'm using:
@react-native-firebase/analytics"
@react-native-firebase/app"
@react-native-firebase/auth"
@react-native-firebase/firestore"
@react-native-firebase/remote-config"
weirdly enough the problem seems to be gone by it self. Thought that it started to work when I downgraded everything to 6.0.0
but then I bumped it up again and it worked too.
So my only lead on is this:
I remember seeing that error yesterday, maybe something was looping and firebase cut all requests from my emulator. Maybe if that's the case, the implementation is not handling that specific case and it just hangs
But anyways, thanks for your help and let me know if there's anything I can help with diagnosing this a bit further
I remember having troubles using fetchAndActivate().
I fixed it by doing the fetch and activate manually directly in the code :
export function actionFetchRemoteConfig() {
try {
await remoteConfig.remoteConfig().setDefaults({
[...]
});
await remoteConfig.remoteConfig().setConfigSettings({
isDeveloperModeEnabled: __DEV__
});
await remoteConfig.remoteConfig().fetch();
const activated = remoteConfig.remoteConfig().activate();
// const activated = await remoteConfig.remoteConfig().fetchAndActivate();
let res: any = undefined;
if (activated) {
let confVal = remoteConfig.remoteConfig().getValue("xxx");
let result = confVal.value as string;
}
else {}
} catch (err) {
}
};
}
hope that helps...
@aaska Yep, also tried that and same thing happened: promise never resolved. But haven't happened to me again, almost sure it had something to do with that access blocked
I got at some point.
@Ehesp think we can close this for the moment, thanks for your quick response!
@aaska @dgarciamuria did you resolved calling manually fetch and activate?
My remote config is always not activated, calling fetchAndActivate() or fetch() and activate() separately.
this is my redux action:
export function getRemoteConfig() {
return function(dispatch) {
return remoteConfig()
.fetch(500)
.then(() => {
remoteConfig()
.activate()
.then(activated => {
console.log(
'------------- REMOTECONFIG ' +
activated +
' ----------------------------',
);
if (activated) {
var values = remoteConfig().getAll();
dispatch({
type: constants.GET_REMOTE_CONFIG,
remoteConfig: values,
});
}
});
});
};
}
any ideas?
Thanks
@shardick the only thing I see is that the activate function doesn't return a promise but a Boolean, so you shouldn't have the .then() after it.
@shardick this is my current setup in case it helps:
remoteConfig()
.setConfigSettings({
isDeveloperModeEnabled: __DEV__,
})
.then(() =>
remoteConfig()
.setDefaults({
someValues
})
.then(() =>
remoteConfig()
.fetchAndActivate()
.then(activated => {
if (!activated) console.log('Remote Config not activated')
return remoteConfig().fetch()
}),
),
)
I think my original problem had to do with the fact of firebase banning my request for a while, but other than that what did it for to actually being able to fetch values was this line return remoteConfig().fetch()
Thanks guys.
@aaska in 6.1.0 .activate is a Promise, at least from what i seen in ts interfaces and impemented class.
I managed with this:
static async getRemoteConfig()
{
await remoteConfig().setConfigSettings({
isDeveloperModeEnabled: __DEV__,
});
await remoteConfig().setDefaults({
enable_ads: true,
enable_patreon_login: true,
});
await remoteConfig().fetch();
const activated = await remoteConfig().activate();
if (!activated) console.log('Remote Config not activated');
const config = remoteConfig().getAll();
var configProps = {};
Object.keys(config).forEach(c => {
configProps[c] = config[c].value;
});
return configProps;
}
and then using it in redux action more easily.
Thanks!
It seems strange, but in my case the fetchAndActivate resolves but with false. Then I decided to go further and ignore activated variable and was able to get the data.
`
const getEnvironment = () => {
console.log("Getting the environment...");
remoteConfig().setConfigSettings({
isDeveloperModeEnabled: __DEV__
});
//remoteConfig().setDefaults({});
return remoteConfig().fetch()
.then(() => remoteConfig().fetchAndActivate())
.then((activated) => {
console.log("Remote config activated...: ", activated);
let env = { version: 1 };
//if(activated) {
let configData = undefined;
FCM_ARGS.forEach(entry => {
configData = remoteConfig().getValue(entry);
env[entry] = configData.value;
});
console.log("Values in env: ", env);
return Promise.resolve(env);
/*} else {
return Promise.reject({ cause: "Data not activated!" });
}*/
}).catch((error) => {
//console.log("Remote config error: ", error);
return Promise.reject(error);
});
};`
My concern or doubt is why fetchAndActivate resolves the promise but its activated with false value.
same issue as @alexxsanchezm
This is weird; sometimes it works (fetch and activate succeed). Tested last year in December, everything worked perfectly.
In January, I saw a difference between no of people in an A/B test and the no of people in the funnel (the last one being far greater); this indicated that the RemoteConfig doesn't get experiment values on some devices ( activate === true).
Gonna investigate further...
@vaibhavhrt I found out the problem was the signing configuration, My mistake was I was using a different setup for sign the builds, I was copying from my previous apk releases.
See, in other android project I always have 2 different environments in both of them I use different signing keys, and I achieve the environment switch by using flavors, so in each flavor I had a different signing key, so I tried to replicate this behavior in my react native app, but it never worked.
So as the same app/build.gradle file suggests in its comments, I placed the signing config inside build types. Which make me lose flexibility but works.
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
/** NOTE: now I have to comment and uncomment depending what I'm building for.
The same goes for debug build type
**/
signingConfig signingConfigs.test // for debug in developer mode
//signingConfig signingConfigs.production // for production mode
/**
* INFO: You must switch the signature configuration based on production or test mode
* example:
* for test
* signingConfig signingConfigs.test
*
* for production
* signingConfigs.production
*/
}
debug {
minifyEnabled false
multiDexEnabled true
signingConfig signingConfigs.debugTest // for use development stage
//signingConfig signingConfigs.debugProduction // for debug in developer mode
}
}
Hope this helps to anyone else.
getValues() {
remoteConfig()
.setConfigSettings({
isDeveloperModeEnabled: __DEV__,
})
.then(() =>
remoteConfig()
.setDefaults({
experiment: 'defaultExperiment',
})
.then(() =>
remoteConfig()
.fetchAndActivate()
.then(activated => {
if (!activated) {
console.log(
'Remote Config not activated',
);
} else {
console.log( 'Remote Config activated');
return remoteConfig().getAll();
}
}),
),
);
}
It seems strange, but in my case the fetchAndActivate resolves but with false. Then I decided to go further and ignore activated variable and was able to get the data.
`
const getEnvironment = () => { console.log("Getting the environment..."); remoteConfig().setConfigSettings({ isDeveloperModeEnabled: __DEV__ }); //remoteConfig().setDefaults({}); return remoteConfig().fetch() .then(() => remoteConfig().fetchAndActivate()) .then((activated) => { console.log("Remote config activated...: ", activated); let env = { version: 1 }; //if(activated) { let configData = undefined; FCM_ARGS.forEach(entry => { configData = remoteConfig().getValue(entry); env[entry] = configData.value; }); console.log("Values in env: ", env); return Promise.resolve(env); /*} else { return Promise.reject({ cause: "Data not activated!" }); }*/ }).catch((error) => { //console.log("Remote config error: ", error); return Promise.reject(error); });
};`
My concern or doubt is why fetchAndActivate resolves the promise but its activated with false value.
Tried many solutions. Finally this worked! fetchAndActivate always resolved to false for me, so like you recommended, Ignored that and moved on to call getValues and I was able to get the values.
The same, fetchAndActivate
returns false, I am ignoring it right now, thanks for you help
The issue (fetchAndActivate always resolves to false) is still relevant and it is happening in iOS too.
@shardick this is my current setup in case it helps:
remoteConfig() .setConfigSettings({ isDeveloperModeEnabled: __DEV__, }) .then(() => remoteConfig() .setDefaults({ someValues }) .then(() => remoteConfig() .fetchAndActivate() .then(activated => { if (!activated) console.log('Remote Config not activated') return remoteConfig().fetch() }), ), )
I think my original problem had to do with the fact of firebase banning my request for a while, but other than that what did it for to actually being able to fetch values was this line
return remoteConfig().fetch()
Thank you this works.
I think this is still an issue, with periodic new reports #3705
I'm getting this. remoteConfig().fetch() in android and it hangs from there. No log or anything further. No crash either.
Simulator works fine, just an issue on device.
I'm getting this. remoteConfig().fetch() in android and it hangs from there. No log or anything further. No crash either.
Which version are you using? In the change log, in the latest version, I see that they have changed the method of getting RC values. It might fix things.
Aaaaand i'm a goose. The test android device i was using didn't have wifi connected 馃お
Its been a long day haha.
my solution is to use remoteConfig().activate()
and remoteConfig().fetch()
separately.
+1 fetchAndActivate
and also separately doesn't work as expected and always return false for me, even when i'm able to get the values remotely
Not sure if the behavior is the same for the web sdk but it returns false if the remote config values were already fetched before. The fact that it returns true if I clean the application data confirms that
Both fetchAndActivate
and separate fetch
+ activate
calls always return false on Android, variables are fetched though.
iOS works perfect.
cc @russellwheatley
Still not working.
I was got activate true only once after published new data.
Skip activation step, just getting values now.
async getConfig() {
await remoteConfig().setConfigSettings({ testVal: 0 });
const activated = await remoteConfig().fetchAndActivate();
console.log(activated); <--- Random true|false !!!
const parameters = remoteConfig().getAll();
const res = {};
Object.entries(parameters).forEach(
([key, parameter]) => { res[key] = parameter._value; },
);
return res;
},
For current moment I switched to Realtime Database my logic.
The API has actually changed @AndreyPatseiko - it was a breaking change to fix it in order to conform with the way the underlying SDK was supposed to work - have you taken that in to account?
You will only get "true" for any "activate" API now if new values were activated
Upstream activate: https://developers.google.com/android/reference/com/google/firebase/remoteconfig/FirebaseRemoteConfig#public-taskboolean-activate
Upstream fetchAndActiviate: https://developers.google.com/android/reference/com/google/firebase/remoteconfig/FirebaseRemoteConfig#public-taskboolean-fetchandactivate
Your statement:
I was got activate true only once after published new data.
Thus appears to conform exactly with expected behavior, so the "Still not working" seems like it could be edited to "working as intended for new API and upstream API documentation" ?
Previous behaviour returned a boolean indicating if config values were activated
New behaviour returns a boolean indicating if any config values were fetched remotely.
activate
Previous behaviour returned a boolean indicating if config values were activated
New behaviour returns a boolean indicating if any local config values were activated.
Most helpful comment
It seems strange, but in my case the fetchAndActivate resolves but with false. Then I decided to go further and ignore activated variable and was able to get the data.
`
};`
My concern or doubt is why fetchAndActivate resolves the promise but its activated with false value.