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

Add functionality for Native Ads #333

Open
shawnweiland opened this issue Oct 1, 2024 · 2 comments
Open

Add functionality for Native Ads #333

shawnweiland opened this issue Oct 1, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@shawnweiland
Copy link

shawnweiland commented Oct 1, 2024

Feature Request: Native Ad Integration in AdMob Plugin

Is your feature request related to a problem? Please describe.
While using the AdMob plugin for Capacitor, it is difficult to integrate native ad formats effectively. The current plugin setup supports basic ad formats such as banners and interstitials but lacks the necessary support for native ads. This limitation affects developers who want to create more customized and engaging ad experiences with native ads. Native ads are essential for apps that want to blend advertising content seamlessly into their user interface, improving user engagement and monetization.

Describe the solution you'd like
I propose adding support for native ads to the existing Capacitor AdMob plugin. The feature should allow developers to load, display, and manage native ads with flexibility, including retrieving key ad data (headline, body, images, call-to-action, etc.). The plugin could expose functions such as:

initialize(adUnitId): To initialize the AdMob SDK for native ads.
loadNativeAd(adUnitId): To request and load a native ad.
getNativeAdData(): To retrieve loaded native ad data and send it to the web interface.
notifyListeners(): To send ad load status or data to the web layer through event listeners.
These methods would empower developers to access and display native ad components in a custom way, maintaining a seamless user experience.

Describe alternatives you've considered

Building a custom plugin: We explored creating a custom Capacitor plugin that implements native ads using AdMob's NativeAdLoader and manually handles the communication between the native side (iOS and Android) and the Capacitor web view. This is functional but requires more effort for developers and results in fragmentation across the developer community.
Using web-based ads: While web-based ads such as banner and interstitials are easier to integrate, they don't provide the same level of customization or seamless integration into the app's design, making native ads a better option for certain use cases.
Additional context
We have implemented a prototype with a similar setup using the GADNativeAdLoaderDelegate in iOS. The approach retrieves ad components (headline, body, images) and sends them to the web view via event listeners. It would be beneficial for developers to have this functionality built into the official AdMob Capacitor plugin. This would improve app engagement, allow for more creative ad placements, and offer greater control over the ad content display.

Here is an example of how the methods could be structured:

Frontend example:
AdMob.loadNativeAd({
adUnitId: 'your-ad-unit-id',
}).then(() => {
AdMob.getNativeAdData().then(adData => {
console.log('Native Ad Data: ', adData);
});
});

This would reduce the barrier to entry for developers looking to monetize their apps more effectively with native ads.

@kaic0
Copy link

kaic0 commented Nov 4, 2024

is capacitor stills alive? does anyone read this?

@distante distante added the help wanted Extra attention is needed label Nov 5, 2024
@distante
Copy link
Contributor

distante commented Nov 5, 2024

This is an open source plugin, anyone can contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants