The A/B tests for the Android app of my project do not display any live data on the main A/B testing page. Live data is displayed for the iOS version.
I’ve tested the experiments on a couple of Android devices and I’m receiving the correct values from the FirebaseRemoteConfig so the experiments are running correctly.
Here's a screenshot of what I mean
The iOS test is on the left and the Android one is on the right. Although the iOS test was only made 50 minutes ago, it shows data whereas the Android test was created over 20 hours ago and shows no live data.
I understand that "0 Total Users" can be shown for 24 hours or more after the experiment is started so I'm not concerned about that. But since the iOS test shows the live data chart, I find it strange that the Android one doesn't.
The tests are working in devices but I'll add some code as well. Here's how I'm fetching the remote config values.
final FirebaseRemoteConfig remoteConfig = FirebaseRemoteConfig.getInstance();
remoteConfig.setConfigSettings(new FirebaseRemoteConfigSettings.Builder()
.build());
HashMap<String, Object> defaults = new HashMap<>();
defaults.put(PARAMETER_NAME, DEFAULT_VALUE);
remoteConfig.setDefaults(defaults);
long cacheExpirationSeconds = BuildConfig.DEBUG ? 0
: TimeUnit.HOURS.toSeconds(12);
remoteConfig.fetch(cacheExpirationSeconds).addOnSuccessListener(new OnSuccessListener<Void>() {
#Override
public void onSuccess(Void aVoid) {
remoteConfig.activateFetched();
}
});
Any ideas why this is would be helpful, thanks.
Seems this is related to an issue with the latest version of Firebase config SDK. From the release notes:
The latest release of the Firebase Android SDK for Remote Config (v16.1.2) causes A/B Testing to not work as expected. Remote Config SDK v16.1.2 does not collect user behavior for A/B Testing experiments which causes reports to show that an experiment has zero users.
If you've configured both A/B Testing and Remote Config in your project, use v16.1.0 of the Remote Config Android SDK.
I changed to v16.1.0 and it's showing the live data now.
Also, the notes mention the following:
Note that downgrading Remote Config to v16.1.0 requires that the following Android SDKs (if they're used in your project with Remote Config) to be at the following versions:
com.google.firebase:firebase-ads:17.1.1
com.google.firebase:firebase-analytics:16.0.5
com.google.firebase:firebase-dynamic-links:16.1.3
com.google.firebase:firebase-invites:16.0.5
com.google.firebase:firebase-core:16.0.5
I'm only using Firebase core but changing the version to 16.0.5 created conflicts with other Google libraries. I then used the latest version, 16.0.6, and the remote config and live data still work fine. Just for anyone else having some issues with that.
Related
I am struggling to implement Google's Firebase push notifications in a mature MVVMcross application. We are being forced to seek a new solution to our current one because it appears that the functionality is about to be deprecated in AppCenter.
We've placed the code inside the RootActivity file (at the bottom of the method)
protected override void OnCreate(Bundle bundle)
When I run the app in a USB/debug scenario on my Android Galaxy I get the current error "Default FirebaseApp is not initialized in this process"
I tried to use the approach that was recommended in the error message to no avail:
FirebaseApp.InitializeApp(RootActivity.Context);
FirebaseMessaging.Instance.GetToken().AddOnCompleteListener(new OnCompleteListener());
In case anyone is wondering here is the code for the method that is mentioned above was setup for testing purposes using a breakpoint:
public class OnCompleteListener : Java.Lang.Object, IOnCompleteListener
{
public void OnComplete(Android.Gms.Tasks.Task task)
{
var token = task.Result.ToString();
}
}
We initially tested this in a standard Xamarin Forms Android app for testing and didn't have any problem with getting the token but we hit the wall when we played with it in our client's MVVMcross app.
I would also like to mention that I have tried the following solution with no luck as well:
var setupSingleton = MvxAndroidSetupSingleton.EnsureSingletonAvailable(Context);
setupSingleton.EnsureInitialized();
FirebaseMessaging.Instance.GetToken().AddOnCompleteListener(new OnCompleteListener());
I found that I had two problems. The first one was the fact that my project name did not match in my manifest and google services key. I was using my own key that I setup for testing. After I realized this I switched back to my client's key and double checked that it was part of the build. As soon as I resolved that issue I found that I needed to install the nuget package for Xamarin.Google.Dagger to resolve the reflection issues. After taking care of that I did a clean/rebuild and ran the debug on my Galaxy S20 test device. This fix allowed me to hit my test break point that I setup for testing the token reception from FCM.
I'm working with AppsFlyer in Unity based on the following documentation: https://support.appsflyer.com/hc/en-us/articles/213766183-Unity-plugin-V4-integration-guide-for-developers
I followed the necessary steps but when it came to running the integration test, it just stayed stuck in this screen:
https://imgur.com/a/taXW909
Are there any potential things that I might be missing that could cause this issue? As far as I understand, I need to whitelist my Android device, select it in the SDK Integration Test, scan the QR Code, install my project's .apk file and the AppsFlyer should start detecting something.
Additional details
Here's the script for initializing AppsFlyer:
public class AppsFlyerObject : MonoBehaviour
{
private const string AppsFlyerKey = /* MY DEV KEY */;
private void Start()
{
AppsFlyer.setAppsFlyerKey(AppsFlyerKey);
AppsFlyer.init(AppsFlyerKey, "AppsFlyerTrackerCallbacks");
}
}
Regarding the AppsFlyer app, here're the settings I selected:
https://imgur.com/a/7PxEnlW
I want to test an APK file that is not present on any kind of a store.
Have you tried testing a non-organic install with this link?
https://support.appsflyer.com/hc/en-us/articles/207032126#integration-43-simulating-a-nonorganic-install
If everything implemented correctly, but you are still stuck on this screen - it's very likely you have 'zero plan' on your AppsFlyer account. You cannot pass this test on free plan for some reason.
I've found it after two days by connecting device via logcat and recieving 403 error. You can do same to be sure its your reason too.
I'm setting up a Pedometer app in React Native using Expo, testing the code on my real Samsung s10 device.
I am using the Expo Pedometer documentation
However, when I use the Pedometer.getStepCountAsync method, I get returned an error "Getting step count for date range is not supported on Android yet."
I am trying to make a pedometer app that reads users steps, and then puts them into some visuals for the user but I can't get the steps data.
My code is below: it reaches the error => line and returns the error mentioned above. :(
I've enabled the Fitness API in my Google Developer Console and am 99% sure I have the right credentials; as I have used the Google Login successfully in the same app.
const end = new Date();
const start = new Date();
start.setDate(end.getDate() - 1);
Pedometer.getStepCountAsync(start, end).then(
result => {
this.setState({ pastStepCount: result.steps });
},
error => {
this.setState({
pastStepCount: "Could not get stepCount: " + error
});
}
);
I guess the expected result is that I get the user's steps from the past day in the result but instead I get the error that it is not supported on android.
I did something nasty as a workaround but it worked I added expo 33 as a legacy npm dependency and use only the pedometer module from there because currently they didn't implemented the pedometer functionality on android on the new Expo unimodules
package.json
"expo": "^35.0.0",
"expo-legacy": "npm:expo#33.0.0",
And use it like this
import {Pedometer} from 'expo-legacy'
Surprisingly compiled and only increased 200kb the apk size
Yes, by using Core Motion (iOS) or Google Fit (Android) to get the user's step count.
Any Android phone running on a 4.4 (KitKat) operating system or later will connect with Google Fit.
Pedometer unable to query steps, documentation unclear/contradictory.
I am working on the debug version of an android app. I was able to send both SMS and email invites until I recently installed a different OS on my machine (both Linux). As a result, I also updated Android Studio to the latest version, and imported my old project settings. The rest of the application works fine, I can also start the activity for selecting invites, it displays the message that Invitation was sent, but AppInviteInvitation.getInvitationIds returns 0 length array in onActivityResult.
I tried to add Sha1 and Sha256 to the app in the Firebase console, removed Firebase completely and then added it back to the android project in Android Studio (also removed and added again application and project in the firebase console). So checked and tried most of the solutions on SO, but none seems to work. I am probably omitting something. I am using two google accounts, one for firebase, one for email sending from device.
What else could I verify? Is there any way to dig deeper in Firebase invites in order to find the issue?
The intent:
private void onInviteClicked() {
Intent intent = new AppInviteInvitation.IntentBuilder("MyApp")
.setMessage("Some message of 90 nospecial chars")
// .setDeepLink(createDynamicLink(2))
.setCustomImage(Uri.parse("http://correct url"))
.setCallToActionText("Call to action")
.build();
startActivityForResult(intent, REQUEST_INVITE);
}
Short: keep message short (tested with < 40 chars)
Long: My intent actually contained a 90 character message (no special chars), which was sent just fine before the update. After the update, I need to reduce the length of the message (tested with ~40 characters, none is special), in order for it to be sent.
I wonder what determined this behavior. Things that were changed: java (previously was oracle jdk, now it is the java that comes by default with Android Studio); Maybe also java version. Build tools version 25.0.2 -> 26.0.0.
I have an app working and published in the Apple's app store. We are developing an update with new features and I noticed that the NotificationsRegistrationHandler is not being called anymore on iOS when the user accepts to receive notification (in Android is working fine). Which means the application is not getting the "DeviceToken", so we are unable to send notification. The proc. is very simple, and doesn't look like the issue because it's working for Android devices:
for each
where DeviceType = &DeviceType // enum domain SmartDeviceType
where DeviceId = &DeviceId // Character(128)
DeviceToken = &DeviceToken // Character(255)
DeviceName = &DeviceName // Character(128)
when none
new
DeviceType = &DeviceType
DeviceId = &DeviceId
DeviceToken = &DeviceToken
DeviceName = &DeviceName
endnew
endfor
What I have tried so far:
Generate and install new distribuition certificates and provision profiles.
Rebuild All, Build With This Only, etc.
Tested in "TestFlight" also.
Tested in different devices.
The published app right now is working, however I fear to publish this upgrade and screw up the notification.
I'm using GeneXus Evo 3 U2, .NET generator and Oracle.
Any suggestion how to fix this?
EDIT: Tested with distribuition certificate and sandbox=false, builded for distribuition and sended to testflight, same problem. =/
Have you checked that in the Provisioning Profile (developer.apple.com) the Push Notification service is active:
Enabled Services:
Game Center, In-App Purchase, Push Notifications
I fixed, here is what I did:
Updated from "U2" to "U8". Since "U8" have some OSX and XCode version requirements I updated both to the lastest versions.
Now "NotificationRegistrationHadler" is being called as normal.