Skip to content
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

Google native ads integrated into a Flutter widget tree #12114

Closed
sethladd opened this issue Sep 15, 2017 · 147 comments
Closed

Google native ads integrated into a Flutter widget tree #12114

sethladd opened this issue Sep 15, 2017 · 147 comments
Labels
c: new feature Nothing broken; request for a new capability customer: crowd Affects or could affect many people, though not necessarily a specific customer. p: firebase_admob Plugin to show Firebase AdMob ads p: firebase Firebase plugins P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels.

Comments

@sethladd
Copy link
Contributor

sethladd commented Sep 15, 2017

This comment discusses the different ways we are considering addressing this issue, and provides links to more specific issues that cover specific steps towards this issue: #12114 (comment)
We are working on some of these today. Please see the individual bugs for details.


Both Firebase (AdMob) and Facebook support a "Native Ads" format:

Native ads are rendered inline with the app's content, with rendering and formatting (colors, fonts) controlled by the app itself.

@gcshri
Copy link

gcshri commented Oct 12, 2017

Would it not be better to have DFP support? Would allow us to integrate a wider range of products, including in house banners, Ad Exchange/AdSense along with native / fluid ads?

@sethladd
Copy link
Contributor Author

Thanks for your feedback! Can you link us to DFP?

@Takhion
Copy link

Takhion commented Oct 12, 2017

I think @gcshri means DoubleClick for Publishers, which funnily enough was formerly called DART 😄

@sethladd
Copy link
Contributor Author

sethladd commented Oct 12, 2017 via email

@gcshri
Copy link

gcshri commented Oct 12, 2017

Yep. Avoided Dart as I kept thinking it was some scripting language that came out of the doubleclick shop. But seriously, integration with DFP would open up Flutter to some of us who rely on ad revenue from Google and other sources.

@sethladd
Copy link
Contributor Author

sethladd commented Oct 12, 2017

Thanks. If you can add some links for APIs relevant to DFP, we (and the community) can take a look at what the requirements are.

@gcshri
Copy link

gcshri commented Oct 12, 2017 via email

@sethladd
Copy link
Contributor Author

This dupes #8098

@mit-mit
Copy link
Member

mit-mit commented Mar 5, 2018

Re-activating again. #8098 was restricted to track just banner & interstitial support.

If support for Admob Native ads is important to you, please consider "casting a vote" on this by clicking 'thumbs up' on the top-most comment of this bug.

@mit-mit mit-mit reopened this Mar 5, 2018
@mit-mit mit-mit added plugin p: firebase Firebase plugins labels Mar 5, 2018
@andreyvgavrilov
Copy link

Is this even possible without some work on the Admob side? I mean Flutter uses custom drawn controls and native ads use native controls.

Generally this issue is the main stopper to use Flutter in my current project as I don't know when it will be possible to use the native ads and whether it will be possible at all.

@Purus
Copy link

Purus commented Mar 6, 2018

This would be a great addition where Native Ads can be displayed inline with the content of the app.

@putraxor
Copy link

putraxor commented May 5, 2018

any progress on this?

@Ivaskuu
Copy link

Ivaskuu commented May 23, 2018

We (community) really need this. Any progress on this?

Even Unity games (and apps) can show native ads: https://developers.google.com/admob/unity/custom-native

@MaskyS
Copy link

MaskyS commented May 27, 2018

Agreed, this feature is really needed. Bit ambitious, but could we get this into the 1.0 milestone or earlier? cc @mit-mit

@mit-mit
Copy link
Member

mit-mit commented May 28, 2018

Sorry, we don't have a timeline we can offer for this feature.

@gcshri
Copy link

gcshri commented May 29, 2018

If it cannot be done as a flutter widget, is it possible that we (i.e. me) can look at editing the kotlin / swift versions of the code and using the mobile ads sdk with them? Not too sure about how Flutter works, but I assume that since it allows hooking into native APIs, this should be possible?

@kyleorin
Copy link

If devs will be able to use the AdMob package and position it using guidelines and approval of some sort it would be amazing - both from user and dev in my opinion.

@creativefull
Copy link

any progress?

@aqibgatoo
Copy link

Any progress on this. This thing is needed quite badly.

@Hixie Hixie added the c: new feature Nothing broken; request for a new capability label Oct 23, 2018
@harshapulikollu
Copy link

Desperate to have native ads support in flutter listviews. Any sort of timeline about when we are able to use native ads in flutter by the team will be helpful.

@AdiLaxman
Copy link

There are so many third-party plugins that implement native ads by AdMob. Knowing the notoriety of Google for banning the developers for trivial issues, I am afraid to use those solutions. I am looking forward to the first-party implementation of this. Could you please give a timeline?

@timsneath
Copy link
Contributor

We have good news for you all, with today's announcement of beta support for this feature:
Support for inline banner and native ads formats in Flutter

Right now this is in a closed beta, but we strongly encourage you to apply to join if you're ready to use this feature in a production app. Assuming all goes well, we plan to open this up more broadly in early 2021.

@timsneath timsneath added P1 High-priority issues at the top of the work list and removed P6 labels Nov 12, 2020
@nateshmbhat
Copy link

We have good news for you all, with today's announcement of beta support for this feature:
Support for inline banner and native ads formats in Flutter

Right now this is in a closed beta, but we strongly encourage you to apply to join if you're ready to use this feature in a production app. Assuming all goes well, we plan to open this up more broadly in early 2021.

This is awesome ❤️. Been a few days since I applied for the beta program. Waiting eagerly for a reply ✨

@zerox1212
Copy link

I also applied for the beta program. Has anyone received a response?

@peterkapena
Copy link

peterkapena commented Jan 10, 2021

I was approved as a member of the beta program but have no idea how to implement this. Does anyone know how to do this?

@mileusna
Copy link

I was approved as a member of the beta program but have no idea how to implement this. Does anyone know how to do this?

What problem exactly do you have? I'm in beta for a while now and it is working fine. Native Ads are little bit trickier than banner and publisher ads which are very simple.

@peterkapena
Copy link

I was approved as a member of the beta program but have no idea how to implement this. Does anyone know how to do this?

What problem exactly do you have? I'm in beta for a while now and it is working fine. Native Ads are little bit trickier than banner and publisher ads which are very simple.

The documentation to implementing the native ads is using Java. And this certainly is confusing as flutter is in dart, should we add a java file? Please share your source code and how you did it. Many thanks

@mileusna
Copy link

mileusna commented Jan 11, 2021

Unfortunately, for NativeAds, yes, you need some Java code to produce native ad and pass it to Flutter (same for iOS I guess, but still haven't reached that part).

You can start with/firebase_admob/example/ from beta repository. There you can find initial code for Java (NativeAdFactoryExample.java and MainActivity.java) with NativeAdView (/res/layout/my_native_ad.xml) that you can edit and customize for your own needs in Andorid studio.

I also had no experience with Java development for Android before, but it is easy to figure it out.

Make sure that your MainActivity.java looks like this, I had to add one line to make it work in my own project:

public class MainActivity extends FlutterActivity {
  @Override
  public void configureFlutterEngine(FlutterEngine flutterEngine) {
    GeneratedPluginRegistrant.registerWith(flutterEngine);  // I had to add this to make it work
    flutterEngine.getPlugins().add(new E2EPlugin());
    flutterEngine.getPlugins().add(new FirebaseAdMobPlugin());

    final NativeAdFactory factory = new NativeAdFactoryExample(getLayoutInflater());
    FirebaseAdMobPlugin.registerNativeAdFactory(flutterEngine, "adFactoryExample", factory);
  }

  @Override
  public void cleanUpFlutterEngine(FlutterEngine flutterEngine) {
    FirebaseAdMobPlugin.unregisterNativeAdFactory(flutterEngine, "adFactoryExample");
  }
}

@yilmazgokhan
Copy link

Is there any update?

@mileusna
Copy link

Is there any update?

As one of the beta testers, I can confirm that widget exists 😀 and it works since I use it event in the production, in my published app.
I don't know when it will be released from beta, but I hope it will be soon.

@Purus
Copy link

Purus commented Feb 23, 2021 via email

@pa2codes
Copy link

I am also a beta tester. There are few issues in the new package that's stopping me from using in production.

On Mon, 22 Feb, 2021, 5:11 pm Miloš Mileusnić, @.***> wrote: Is there any update? As one of the beta testers, I can confirm that widget exists 😀 and it works since I use it event in the production, in my published app. I don't know when it will be released from beta, but I hope it will be soon. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#12114 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHDZYWG4RHOO5V7H6GFWDTAI7FBANCNFSM4D3FBARA .

What issues @Purus ? Please explain more detailed. Thanks

@houdayec
Copy link

houdayec commented Mar 3, 2021

Do we still need to be part of closed beta in order to use NativeAd widget available from here?

@mileusna
Copy link

mileusna commented Mar 3, 2021

Do we still need to be part of closed beta in order to use NativeAd widget available from here?

That is just a small version bump in old firebase_admob package, you still can't put ads in widget tree with this version.

And as far as I can see, new package will have the new name, it won't be called firebase_admob.

@houdayec
Copy link

houdayec commented Mar 3, 2021

Do we still need to be part of closed beta in order to use NativeAd widget available from here?

That is just a small version bump in old firebase_admob package, you still can't put ads in widget tree with this version.

And as far as I can see, new package will have the new name, it won't be called firebase_admob.

Thanks for your answer.

@dayron9110
Copy link

I am also a beta tester. There are few issues in the new package that's stopping me from using in production.

On Mon, 22 Feb, 2021, 5:11 pm Miloš Mileusnić, @.***> wrote: Is there any update? As one of the beta testers, I can confirm that widget exists 😀 and it works since I use it event in the production, in my published app. I don't know when it will be released from beta, but I hope it will be soon. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#12114 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIHDZYWG4RHOO5V7H6GFWDTAI7FBANCNFSM4D3FBARA .

Is this the new package?
https://pub.dev/packages/google_mobile_ads

@timsneath
Copy link
Contributor

Yup -- that's the one. And there's a good session on using it here: https://www.youtube.com/watch?v=m0d_pbgeeG8

@zoeyfan
Copy link

zoeyfan commented Mar 3, 2021

Given Google Mobile Ads SDK is open for beta, I think we can close this issue now!
Please check our new plugin below, and happy coding and advertising!
https://pub.dev/packages/google_mobile_ads

@zoeyfan zoeyfan closed this as completed Mar 3, 2021
@github-actions
Copy link

github-actions bot commented Aug 5, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability customer: crowd Affects or could affect many people, though not necessarily a specific customer. p: firebase_admob Plugin to show Firebase AdMob ads p: firebase Firebase plugins P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels.
Projects
Ecosystem - Bitcoin
  
Awaiting triage
Development

No branches or pull requests