Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Android Banner in Production disappears after 3-5 seconds #2

Open
AndyVavrynets opened this issue Sep 10, 2020 · 9 comments
Open

Android Banner in Production disappears after 3-5 seconds #2

AndyVavrynets opened this issue Sep 10, 2020 · 9 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@AndyVavrynets
Copy link

Hello @vegidio , thank you for you work. It's really great. But I have small issue - on Android when using not test mode (in released app) Android don't want display a banner ad. It seems that BannerAd loads successfully (callback onBannerLoaded is triggered), then shows in view but after 3-5 sec it disappears.

I contacted Appodeal SDK team - they said it can be problem that some view overlaps it. But in my app BannerAd is at the bottom of the screen and doesn't overlap with any widget.

I tested with Example provider in your repository - same behaviour.

@vegidio
Copy link
Owner

vegidio commented Sep 10, 2020

Thanks for the report.

I didn't manage to recreate this bug exactly in the same scenario that you described, but I found a similar bug that might be related to the problem that you are facing now. When I have an app with 2 screens showing banner ads, the banner on the first screen disappears as soon as I present the banner on the second screen. 😟

I will spend some time investigating this further and I will also contact the Appodeal team to see if they can help us with this.

@vegidio vegidio added bug Something isn't working help wanted Extra attention is needed labels Sep 10, 2020
@vegidio
Copy link
Owner

vegidio commented Sep 10, 2020

@AndyVavrynets I finally recreated the issue that you reported, so thanks again for finding it.

However I must be honest with you: I have no idea how to fix this yet 🙁 - According to the response that I got from Appodeal's support team, everything should just work if I call the function Appodeal.show(Appodeal.BANNER) on Android, but this didn't seem to fix the bug.

I will look at this bug again over the weekend, but I just want to set the expectations that it might take a while to fix this. So any further help from you or anybody else reading this issue is appreciated 🙂

@AndyVavrynets
Copy link
Author

Thank you for you feedback.

I'll try to look on it over coming weekend too.

@mafila
Copy link

mafila commented Sep 18, 2020

Hello. This fix in banner.dart helped me with this problem on Android:

import 'dart:io';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';

class AppodealBanner extends StatelessWidget {
  static const MethodChannel _channel = const MethodChannel('appodeal_flutter');
  Widget build(BuildContext context) {
    return AndroidView(
      viewType: 'plugins.io.vinicius.appodeal/banner',
      creationParams: {},
      creationParamsCodec: const StandardMessageCodec(),
      onPlatformViewCreated: (id) {
        print('AppodealBanner.onPlatformViewCreated id=$id');
        _channel.invokeMethod('show', { 'adType': 1 });
      }
    );
  }
}

@vegidio
Copy link
Owner

vegidio commented Sep 18, 2020

Привет, @mafila :)

Thanks, I will test your code today and hopefully that will fix this bug. If you prefer to open a PR instead, you could appear in the list of contributors of this package after that's merged.

@mafila
Copy link

mafila commented Sep 18, 2020

@vegidio thanks for the great job on this package!
I've done more tests - my fix is not really works.
But in some incomprehensible way it makes the banner in release work better.
I'll continue to research this issue.

@merthankavak
Copy link

@mafila Did you find anything

@oliverbytes
Copy link

same issue for me here! hope someone can fix it soon

@ashkryab-fl
Copy link

same issue for me((

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants