Can we create ‘Native Ads’ in ionic?

谁说胖子不能爱 提交于 2021-02-07 03:36:58

问题


I want to implement the native Ads in the ionic app. I have seen some native android apps which are using Native Ads to display Ads in the middle of the app content. I need the same functionality to display Ads in specific position of the app. Currently I am using google admob plugin for ads, I am able to create banner Ads and interstitial Ads but I need Ads in middle of content of the app.

is there any way to implement native ads in ionic?

Thanks in advance.


回答1:


As most people have replied, the answer is still a NO. You can't yet implement AdMob's Native Ad in Ionic.

The other alternative though is, Facebooks Audience Network. I spent some days figuring out how to make it work in an 'Ionic 2' application. I've made the code public on my blog along with Video Tutorials to implement the same. Hope it'll be helpful for some of you.

1. Facebook Native Ads: Ionic 2

2. Facebook Native Ads Clickable Area: Ionic 2

Other codes ..(just in case someone is still looking for it)

3. Facebook Banner and Interstitial Ads: Ionic 2

4. Adding AdMob In Ionic 2 (Banner, Interstitial and Rewarded Video Ads.)




回答2:


In ionic with google admob we can't create 'Native ads'

we have used 'Facebook audience network' ads for integrating the native ads in ionic.

we have a clear cordova plugin to integrate facebook ads which make my work simpler.

you can refer this cordova plugin : https://github.com/floatinghotpot/cordova-plugin-facebookads

if any one has any issue with this plugin integration you can post here, i will try to help you.

Thanks.




回答3:


Currently the answer is "no". ionic/Cordova based on a webview. Native ad requires to be displayed in a native view, and you can not insert a native view to a webview.
There are still two options that I will not recommend to use:

  1. Use a plug in called "Cordova admob pro" along with Facebook audience network. It is using a "hack" way to display facebook native ad: display ad content in webview, and a clickable transparent-background native view in front of the webview, using bridge codes to let the native view to cover the webview-ad. I do not recommend this because it is too complicated and you can not implement it "freely".

  2. Many ad networks provide Mobile Web API. They are all javascript API, so you can easily insert ads to your content. But this kind of usage is not listed in any of their documents. So it is a risk.

I'd recommend you to take a look at "react native" + facebook audience network.



来源:https://stackoverflow.com/questions/38821764/can-we-create-native-ads-in-ionic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!