-
-
Notifications
You must be signed in to change notification settings - Fork 50
[Android] things disapear after showing a interstitial ad #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is the state of the elements dependant on the ad ? |
No, nothing. The exact same code will display the button correctly without the interstitial video. It's like the video messes up something, but can't figure out what. All state variables are correct and the same with/without showing the ad. The ad.show is called from within an async method. This is the logic, I load the add in the contructor, then when the user clicks on a send button it should execute the send logic, then show the ad. Send button logic
In the constructor onAdEvent I also added the redirect after the video is closed:
Logically everything works correctly, the video is shown, the app redirects after closing the video. It's just that after that some buttons and other elements are not displayed anymore. |
Which platform is this running on ? |
Never mind just saw it in the title is this using 8.3 ? |
8.2.3 |
Have you tried wrapping the navigate in a timeout? |
Yes, the navigate works correctly, it's just that after that some buttons disapear. For now I have not enabled interstitial ads as I feel it will be hard to find out what is wrong. Maybe later I'll try to start with an empty project and add the dependencies until I see what is the cause. |
After closing an interstitial ad some of the buttons and elements in the app disapear.
Loading the ad and events work correctly:
this.ad.onAdEvent((event, error, data) => { switch (event) { case AdEventType.LOADED: console.log('ad loaded'); this.ad.show(); break; case AdEventType.CLOSED: this.routerExtensions.navigate(['postcard-viewer', Constants.Modules.PostCardEditor.result]); break; case AdEventType.OPENED: break; case AdEventType.IMPRESSION: break; case AdEventType.FAILED_TO_SHOW_FULL_SCREEN_CONTENT: console.error('InterstitialAd failed to load:', error); this.routerExtensions.navigate(['postcard-viewer', Constants.Modules.PostCardEditor.result]); break; } }); this.ad.load();
Showing the ad also works correctly.
Once the ad is closed, some buttons and elements are not shown anymore for example:
<Button *ngIf="stateService.freeCard && !loadingQuota && quotaAvailable" [isEnabled]="!showspinner" class="pcc-dark-button send-button" [text]="'viewer.backside.free-send' | translate" actionKey="SEND" (tap)="onSendClick()"> </Button>
The text was updated successfully, but these errors were encountered: