两个应用程序如何通过 Firebase 预测更改单个 Firebase 远程配置变量?

问题描述

我有以下情况:

  1. 具有两个构建变体的单个 android studio 项目。两者都使用来自独特 Firebase 项目的单个 #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int status = 0; int *a; for (int n = 1; n < 100000; n += n / 3 + 1) { a = malloc(n * sizeof(int)); for (int i = 0; i < n; i++) a[i] = rand(); clock_t t = clock(); for (int start = 0,end = n - 1; start < end; start++,end--) { int max_index = start; int min_index = start; int max_num = a[max_index]; int min_num = a[min_index]; int temp; for (int i = start + 1; i <= end; i++) { if (max_num < a[i]) max_num = a[max_index = i]; if (min_num > a[i]) min_num = a[min_index = i]; } if (min_index == end) { if (max_index == start) { /* single swap needed */ temp = a[end]; a[end] = a[start]; a[start] = temp; continue; } /* first swap the smallest value at the first position */ temp = a[start]; a[start] = a[min_index]; a[min_index] = temp; /* then swap the largest value at the last position */ temp = a[end]; a[end] = a[max_index]; a[max_index] = temp; } else { /* first swap the largest value at the last position */ temp = a[end]; a[end] = a[max_index]; a[max_index] = temp; /* then swap the smallest value at the first position */ temp = a[start]; a[start] = a[min_index]; a[min_index] = temp; } } t = clock() - t; for (int i = 1; i < n; i++) { if (a[i-1] > a[i]) { printf("sorting error n=%d,a[%d] = %d > %d = a[%d]\n",n,i-1,a[i-1],a[i],i); status = 1; break; } } free(a); printf("n=%d: %.3fms\n",t * 1000.0 / CLOCKS_PER_SEC); } return status; }
google-services.json
  1. 在 firebase 项目中,我有一个 Firebase 远程配置变量,名为 ... defaultConfig { applicationId "com.mypackage.project" minSdkVersion 22 targetSdkVersion 30 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } ... productFlavors { applicationA { versionCode 19 versionName "1.4.5" dimension "versions" applicationIdSuffix ".a" } applicationB { versionCode 7 versionName "1.1.4" dimension "versions" applicationIdSuffix ".b" } } ...

enter image description here

  1. android studio 项目使用如下变量:
in_app_review_enabled
  1. 此变量在服务器端认为 val inAppReviewEnabled = remoteConfig.getBoolean(Constants.RemoteConfig.IN_APP_REVIEW_ENABLED_KEY) ,但 Firebase Predictions 会更改它的条件。

条件为:基于未来7天内断线概率低的用户

此条件将变量更改为 false,然后用户可以查看我的应用

  1. 但是只有 true 会改变这个变量。这是 Firebase 远程配置仪表板中出现的唯一条件,如上图所示。

我的问题是:应用程序 A 和应用程序 B 如何使用 Firebase 预测更改 Firebase 远程配置变量?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...