I'm trying to understand: On Android, How does TestFlight determine that it is in a beta-tester environment, and should upload activity to the TestFlight server? There have been some similar questions asking about TestFlight on iOS, but none related to Android.
I've integrated the TestFlight SDK into my company's Android app because it looked like a great solution for beta-testing and remote logging (we already use it for iOS), but I'm can't get it to actually send the session information to the TestFlight server. Once I install my app through the TestFlight app, I immediately see that it was installed through the TestFlight web console, and then... nada. I get no session data or remote logs, even though I clearly should be getting something.
What I have done so far:
TestFlight.takeOff()
is getting calledTestFlight.isActive()
reports true
My current guess is that the TestFlight lib thinks it is in a production environment, and therefore it should not be uploading logs and session information.
The SDK Documentation has nothing to offer to answer this question, but I feel that if I understood what conditions it is looking for I could nail this down pretty quickly.
I poked into TestFlightLib.jar and found that TestFlight.isActive()
is really only reporting whether or not you've already called TestFlight.takeOff()
, so that's not a good indicator of whether the whole system is working.
Edit: per Isra's answer below, it looks like my first point (batching checkpoints) may no longer be valid.
After trading a few emails with TestFlight support, I am seeing events and have a better understand of what is going on. There are two issues:
TestFlight for Android batches checkpoint
events and sends them to the server once 10 or more events are collected. Events are not preserved across app process lifetimes. My test app was only creating two or three checkpoints, thus nothing ever got sent to the server.
There is an apparent issue where log events are not posted to the server at all unless the TestFlight session is explicitly ended with TestFlight.endSession()
So, the workaround (for now) is to explicitly call TestFlight.endSession()
periodically. Hopefully TestFlight will change (or at least document) this behavior in future releases of the library.
I am going to make a comment on the checkpoint front. I can see checkpoints being reported straight away without needing to end sessions. Looks like they removed the batching on Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With