You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I need to show the paywall, I instantiate AdaptyUI, fetch the paywall using _adapty.getPaywall(), and then present it.
Problem
If I trigger the paywall again after closing it, I receive the following error: AdaptyUIError.viewAlreadyPresented. This issue appears particularly when closing the paywall using the back button on Android.
Question
What’s the best way to prevent AdaptyUIError.viewAlreadyPresented from occurring when reopening the paywall after closing it? Do I have to run _adapty.activate(); every time?
Additional Context
I'm using the back button to dismiss the paywall on Android, which may not be releasing the view as expected.
Any guidance on handling this error or safely resetting the paywall state would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
Description:
Hi, I’m encountering an issue when attempting to reopen the Adapty paywall after it has been closed.
Current Setup
I’ve implemented a singleton to handle the Adapty API as follows:
The singleton is kept alive by a simple Riverpod provider:
When I need to show the paywall, I instantiate
AdaptyUI
, fetch the paywall using_adapty.getPaywall()
, and then present it.Problem
If I trigger the paywall again after closing it, I receive the following error:
AdaptyUIError.viewAlreadyPresented
. This issue appears particularly when closing the paywall using the back button on Android.Question
What’s the best way to prevent
AdaptyUIError.viewAlreadyPresented
from occurring when reopening the paywall after closing it? Do I have to run_adapty.activate();
every time?Additional Context
Any guidance on handling this error or safely resetting the paywall state would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: