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

View property of the CreateBanner method #12

Open
prantikv opened this issue Nov 23, 2016 · 9 comments
Open

View property of the CreateBanner method #12

prantikv opened this issue Nov 23, 2016 · 9 comments

Comments

@prantikv
Copy link

Using Angular 2 along with Nativescript. But I am not sure as to what is to be passed in the view property of the admob.createBanner() method

 admob.createBanner({
          testing: true,
          view:  //What goes here??
          iosTestDeviceIds: ["yourTestDeviceUDIDs", "canBeAddedHere"],
          size: admob.AD_SIZE.SMART_BANNER,
          iosBannerId: "ca-app-pub-XXXXXX/YYYYYY", // add your own
          androidBannerId: "ca-app-pub-AAAAAAAA/BBBBBBB", // add your own
 
       margins: {
        // if both are set, top wins
        top: 100,
        //bottom:0
      }
    })

Also is it possible to show banner ads in stakLayout for example in a stacklayout have tabView I want to show banner ads between tabs and list items?

@EddyVerbruggen
Copy link
Owner

Can you leave out the view?

I've wanted to upgrade this plugin to support defining the banner in XML for quite a while but still haven't found the time to do it..

@prantikv
Copy link
Author

Yes I have left out the view property.
But the major issue here is that the ads show up overlapping the topmost view as you have mentioned in the docs

// if this 'view' property is not set, the banner is overlayed on the current top most view

If I want to show ads at the top with top:0 then this will cover the header of my app and if I show it at the bottom with bottom:0 then it covers some list items that I might have.

As it is in cordova, the ads push the contents of the app and create their own space.

That is a better user experience as overlapping can cause false clicks.

The solutions that I would like to see (don't know if it's possible or not)

A dedicated XML tag that can be dropped in the view which is then used to show ads. Also the XML tag maybe hidden by default if ads are not available otherwise it will leave a block of empty space.

Here are some example images to illustrate this further

image 1
image 2
image 3

Hopefully you get the time. Will be waiting for the change.

-Regards

@JillevdW
Copy link

Has any progress been made on this? @EddyVerbruggen , have you gotten around to defining the banner in XML (or create a view that will contain the banner in XML/HTML)? Thanks in advance 👍

@EddyVerbruggen
Copy link
Owner

No, can't give it priority.

@JillevdW
Copy link

Am I right to assume that the view property we give to the createBanner function is not used right now? Because that is what I'm trying to achieve, adding the advertisement to a view. I'd love to try and do this and then submit a pull request if I get it working.

@EddyVerbruggen
Copy link
Owner

@JillevdW IIRC that's not used for positioning the banner. On Android I'm 100% sure it's not, on iOS there may be some untested code in there.

I'm sure a lot of folks will be thankful if you could pull it off. And I'll be happy to also add your changes to the Firebase plugin as it's using almost identical code and has the same feature because Google integrated AdMob into Firebase a while ago.

If you want to contribute please don't upgrade this plugin to TypeScript, or do some other heavy refactor because that won't make it easier to complete, review, and merge.

@MustafaCa
Copy link

Any progress on this?

@leon486
Copy link

leon486 commented May 23, 2020

This functionality should be high priority, it would heavily improve the usability of this plugin.

@EddyVerbruggen
Copy link
Owner

@leon486 looking forward to your PR.

Repository owner deleted a comment from sylwesterdigital Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants