Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What conditions must be met for TestFlight to send activities to the server?

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:

  • Quadruple-checked my TestFlight api key
  • Verified for certain that TestFlight.takeOff() is getting called
  • Verified that TestFlight.isActive() reports true
  • Tried signing the apk with the debug-only key
  • Tried signing the apk with our release key
  • Checked the android log for errors related to TestFlight (none)
  • Contacted TestFlight support a couple days ago (I've made contact, but no progress yet)

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.

like image 810
Drew Shafer Avatar asked Aug 23 '13 14:08

Drew Shafer


2 Answers

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:

  1. 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.

  2. 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.

like image 130
Drew Shafer Avatar answered Nov 01 '22 16:11

Drew Shafer


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

like image 1
Isra Avatar answered Nov 01 '22 16:11

Isra