When running UI tests with the SFMCSdk initialized I always get an ANR:
ANR in my.package.android
PID: 3250
Reason: executing service my.package.android/com.google.android.gms.measurement.AppMeasurementService
Load: 0.0 / 0.0 / 0.0
----- Output from /proc/pressure/memory -----
some avg10=0.00 avg60=0.00 avg300=0.00 total=454493
full avg10=0.00 avg60=0.00 avg300=0.00 total=191367
----- End output from /proc/pressure/memory -----
How I initialize the SDK:
SFMCSdk.configure(
applicationContext,
SFMCSdkModuleConfig.build {
pushModuleConfig = MarketingCloudConfig.builder().build(applicationContext)
}
)
When I comment out this line then my UI tests are running as expected.
Might be interesting to mention that I am using compose in my tests:
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()