Closed daljit97 closed 5 years ago
@daljit97 - hmm... that's weird.
Can you provide a little more context, like:
onPresentationStateChanged
get called?Also - have you tried moving the emit closed();
line up - to see if it's never called at all?
So I am testing on Android. Ok wait so when is the closed
signal be supposed to emit? When the the user "closes" the ad clicking on the "x" at top of the screen? Because I am expecting it to do so when the user clicks on "x" but your third point seems to imply something else.
@daljit97
Ok wait so when is the closed signal be supposed to emit?
It's supposed to emit after onPresentationStateChanged
changes to Hidden
state. It's added as convenience signal AFAIR. onPresentationStateChanged
should tell you the same.
I'm just asking to be sure that you don't expect it to emit when the app is exiting. Qt's event loop is usually shut down during these app lifecycle events :slightly_smiling_face:
So if onPresentationStateChanged
works you can use that - although onClosed: { ... }
should work according to this code section
... otherwise it's a bug
Sorry for my late reply. I have tested it again and I can confirm that closed
is not triggered. In my debug output I can see:
qml: AdMobInterstitial ::onPresentationStateChanged PresentationStateHidden
but the output Interstitial AD closed
is never seen.
So I have the following code in my QML and the AdMobInterstitial loads just fine. However, when I close the ad the
closed
signal is never called. I have also tried to debug the project and set up some break points in https://github.com/Larpon/QtFirebase/blob/e0a982c4442267e62e653186f07a548aa678df40/src/qtfirebaseadmob.cpp#L987 however they all go untrack which suggest that the slot is never called.