Using PlayCoreKtx version 1.8.1,
I have an instrumented test that tests the inAppUpdate functionality of Play Core. I have a function in my test that looks like this
private fun processAvailableUpdate(appUpdateType: AppUpdateType) = mainActivityScenario.onActivity { mainActivity ->
AppUpdater.processAvailableUpdate(
mainActivity,
AppUpdateResult.Available(
fakeAppUpdateManager,
Tasks.await(fakeAppUpdateManager.appUpdateInfo)
), appUpdateType
)
}
I am getting the following exception on the line
Tasks.await(fakeAppUpdateManager.appUpdateInfo)
java.lang.IllegalArgumentException: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
I assume there is no going around this until it is fixed in the PlayCore library? Unless I am missing something.
Thanks for the help