Comments (59)
@ammarahm-ed
I upgraded to the latest version
(0.3.5)
Now the first ad is showing.
But instead of the second emptiness.
The third is shown again.
from react-native-admob-native-ads.
Try the example app and reproduce the issue.
Also delete your app from the phone, clear the build folders for android/ & android/app then run the app again.
from react-native-admob-native-ads.
@ammarahm-ed
I have the same problem...
Reinstalling the application with deleting the build folder (\android\app\build) did not help
06-13 23:52:24.346 28874 28925 I ReactNativeJS: { error: { message: 'Internal error, an invalid response was received from the ad server.' } }
from react-native-admob-native-ads.
Are you using your own ad ids? If so, wait for a day or two and the ads will start showing. If your app is not published on playstore, when you publish it and it goes live. Ads will start showing. This error is not related to this library but admob server.
from react-native-admob-native-ads.
For testing/development purposes please use the test ad & test app id from the admob website.
from react-native-admob-native-ads.
Are you using your own ad ids? If so, wait for a day or two and the ads will start showing. If your app is not published on playstore, when you publish it and it goes live. Ads will start showing. This error is not related to this library but admob server.
@ammarahm-ed, I am aware of this problem and therefore used these id
https://developers.google.com/admob/android/test-ads
from react-native-admob-native-ads.
Did you run the example? Is it the same in the example app?
from react-native-admob-native-ads.
Did you run the example? Is it the same in the example app?
Lol It seems that this is my network firewall that blocked access to the admob.
Nonetheless:
How can I make layout for video / picture?
I would split the example into:
- Just a banner
- Media banner
from react-native-admob-native-ads.
Hi @KVinS how did you fixed the "network firewall" issue I am using Ubuntu and running application on real device.
from react-native-admob-native-ads.
@KVinS video ads will work when you use native-advanced-video ids. You should use MediaView
. It will automatically load video or image based on the Ad type. You can hide the ad component from the view when ads failed to load sometimes.
from react-native-admob-native-ads.
Hi @KVinS how did you fixed the "network firewall" issue I am using Ubuntu and running application on real device.
@iamshrikantjha
I went to the router and disabled ad blocking through dns.
@KVinS video ads will work when you use native-advanced-video ids. You should use
MediaView
. It will automatically load video or image based on the Ad type. You can hide the ad component from the view when ads failed to load sometimes.
@ammarahm-ed, I understand this in theory. In the main example, a large square is responsible for this. However, the result is only a “simple” advertisement.
I could not get the video. = ( Can you provide a small ONLY video ad code that works for you?
from react-native-admob-native-ads.
@KVinS The same code works for me. Video ads work out of the box. You just have to use native-advanced video ad ids.
Change the Ad ID in the example to Video and it will start showing video ads. You will see video ad id on top of the App.js file.
from react-native-admob-native-ads.
@KVinS The same code works for me. Video ads work out of the box. You just have to use native-advanced video ad ids.
I use it (
'ca-app-pub-3940256099942544/1044960115'
[Mon Jun 15 2020 04:28:57.460] LOG {"error": {"message": "Internal error, an invalid response was received from the ad server."}}
<NativeAdView
onAdLoaded={_onAdLoaded}
onAdFailedToLoad={_onAdFailedToLoad}
style={{
width: '100%',
alignSelf: 'center',
height: 412,
}}
adUnitID={NATIVE_AD_VIDEO_ID}>
<View
style={{
height: 400,
width: '100%',
backgroundColor: 'white',
}}>
<MediaView
style={{
width: 400,
height: 400 / aspectRatio,
backgroundColor: 'gray',
}}
/>
</View>
</NativeAdView>
By the way, don't I need to add "CallToActionView" and "AdBadge"?
from react-native-admob-native-ads.
@KVinS No you don't. The video should play anyways. The error means that the server is not sending the ads for some reason. nothing wrong with the library. check your firewall etc or something. Use a VPN app and it will work. Your network is blocking requests still
from react-native-admob-native-ads.
No you don't.
And how does a user navigate through advertising without an interaction element?
from react-native-admob-native-ads.
@KVinS I meant it is not necessary to show the button, ads work anyways. Also pressing on the icon/text etc also opens the ad and is registered as ad click. But yea it should be added.
from react-native-admob-native-ads.
@KVinS I meant it is not necessary to show the button, ads work anyways. Also pressing on the icon/text etc also opens the ad and is registered as ad click. But yea it should be added.
It's work on real device (not emulator)
But crop video and with frame. Can i set auto size?
from react-native-admob-native-ads.
@KVinS Yes you can, use the aspectRatio value returned in onUnifiedNativeAdLoaded
. Check the example app, it is demonstrated there how to auto size the MediaView etc.
from react-native-admob-native-ads.
We are testing with test ads and on some android devices native ads are having issues and on other devices it works great. Anyone else having similar experience?
from react-native-admob-native-ads.
@ammarahm-ed I launched the application today and it again stopped displaying ads :D
(Simple banner)
Was there some kind of update or something?
At the same time, only the first advertisement does not work.
After updating (in a minute) the banner is displayed.
from react-native-admob-native-ads.
Google sometime wont have the icon with the ad. This isn't handled by the lib that was our issue with native ads.
from react-native-admob-native-ads.
Google sometime wont have the icon with the ad. This isn't handled by the lib that was our issue with native ads.
The action button works. The load event is raised.
But there is no text and image.
If do nothing, then after a while, the ad will be updated and displayed.
from react-native-admob-native-ads.
Check if you are getting ´onUnifiedNativeAdLoaded´ event called with the ad data or not. Also run adb logcat to see if there is any error exception reports logged?
There has been no update yet.
Also maybe you want to try the ´delayAdLoading´ prop and add a delay of 1000 ms or more and see if the views are rendered properly or not.
from react-native-admob-native-ads.
There has been no update yet.
Update - in the sense that "every minute an advertising update is replaced."
06-26 20:21:42.966 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:22:43.722 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:23:44.384 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:24:45.022 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:25:45.665 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:26:46.344 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:27:46.936 31527 31581 I ReactNativeJS: Banner Ad has loaded
06-26 20:28:47.534 31527 31581 I ReactNativeJS: Banner Ad has loaded
Check if you are getting ´onUnifiedNativeAdLoaded´ event called with the ad data or not.
I get an event "onAdLoaded". I can click on the button and go to the site.
But no information is displayed.
from react-native-admob-native-ads.
Try the example app and see if you can find the issue there also?
from react-native-admob-native-ads.
Try the example app and see if you can find the issue there also?
Can you send apk to me, please?
from react-native-admob-native-ads.
You can clone this project and run the example from the example folder.
from react-native-admob-native-ads.
You can clone this project and run the example from the example folder.
This is difficult for me to do. I installed NPM for only one project.
from react-native-admob-native-ads.
@ammarahm-ed Can you send an apk example with a test id?
This is a first load problem.
If i set the refreshInterval to 10, then all subsequent ads will be displayed normally.
I set this hack:
onAdLoaded={setLoading(false);}
refreshInterval={loading ? 10 : 60000}
but it sucks...
@iamshrikantjha try it?
from react-native-admob-native-ads.
Use the ´delayAdLoading´ prop instead and see if it works for you. Also compare your code with the example app.
Add ´delayAdLoading={1000}´
from react-native-admob-native-ads.
Use the ´delayAdLoading´ prop instead and see if it works for you. Also compare your code with the example app.
Add ´delayAdLoading={1000}´
I have tried it.
delayAdloading={1000 + id * 1000}
from react-native-admob-native-ads.
Its ´delayAdLoading´ actually, not ´delayAdloading. The documentation has a bug. @KVinS
from react-native-admob-native-ads.
Its ´delayAdLoading´ actually, not ´delayAdloading. The documentation has a bug. @KVinS
Did not help.
from react-native-admob-native-ads.
See if you can reproduce the issue in the example since I do not see it in the example app and also update to the latest version 0.3.0 just published today
from react-native-admob-native-ads.
See if you can reproduce the issue in the example since I do not see it in the example app and also update to the latest version 0.3.0 just published today
I liked the previous version more...
from react-native-admob-native-ads.
@KVinS clone this project and run the example app.
from react-native-admob-native-ads.
Try the latest release v0.3.4
from react-native-admob-native-ads.
Hi @ammarahm-ed
I am using this package to show native advanced video ads. In iOS it is showing perfectly fine but in the android It is throwing this kind of error. (Screenshot attached here with.) I am here using the test app Id and test unit Ids provided by Google Ad Mob.
Android App Id : ca-app-pub-3940256099942544~3347511713
androidAdUnitCode: 'ca-app-pub-3940256099942544/1044960115',
iOSAdUnitCode: 'ca-app-pub-3940256099942544/2521693316'
What should be the reason. Please help. I am thankful to you.
from react-native-admob-native-ads.
@bhavikgajera92 you are seeing this error because ad is not recieved from the server. Try to use a vpn app etc or something to be sure your network or phone etc are not blocking it. Also be sure you use Android test Ad Ids to show ads on android. The issue is not related to this lib. Also delete your app from phone. Clear build folders and run again.
Try the Example app to see if you are seeing the ads or not.
from react-native-admob-native-ads.
Hi @ammarahm-ed
I have checked with VPN also ads are not loading and I tried the Test Ad Ids as well. For the iOS it is working perfectly well for the same internet but for android it is not. Attaching the screenshot for iOS.
Android side still I am getting this.
I have tested the Ads on same internet on iOS and on Android. On iOS worked perfectly on Android not.
Is there any extra settings to be made at android side ?
Thanks
from react-native-admob-native-ads.
No there are no extra settings. The ad should be returned. Try to run the Example App from the project.
from react-native-admob-native-ads.
Hi @ammarahm-ed
Yes I tried to run Example Project and for Native_Ad_Id I am getting the ads. Attaching the screenshot here with. Perfectly fine in Android as well.
But for NATIVE_AD_VIDEO_ID I am not able to see any video ads. For iOS I am able to but for android I am not able to see. Attaching the screenshot here with.
If the Server is not returning the Ads then it should be for both iOS and android isn't it ?
Thanks
from react-native-admob-native-ads.
Server is not returnings ads. Not an issue with this lib.
from react-native-admob-native-ads.
@bhavikgajera92, Welcome to the club.
Video ads for me only work on a real device.
@ammarahm-ed Hi. Have you added a parameter pass for the GDPR?
Bundle extras = new Bundle();
extras.putString("npa", "1");
AdRequest request = new AdRequest.Builder()
.addNetworkExtrasBundle(AdMobAdapter.class, extras)
.build();
from react-native-admob-native-ads.
Yes added. After getting the consent, pass true or false and rest is handled
from react-native-admob-native-ads.
Check the docs. There is a prop to pass consent for EU users.
´requestNonPersonalizedAdsOnly´
from react-native-admob-native-ads.
Check the docs. There is a prop to pass consent for EU users.
@KVinS
Thank! In which version lib did you add requestNonPersonalizedAdsOnly?
You can slightly update the description. Now there is the same California Consumer Privacy Act (CCPA) and The Brazillian LGPD (Lei Geral de Proteção de Dados).
from react-native-admob-native-ads.
After v0.3.1 but update to the latest version to save yourself from bugs in older version.
from react-native-admob-native-ads.
I also encounter this problem. any updates on this?
from react-native-admob-native-ads.
@bhavikgajera92, Welcome to the club.
Video ads for me only work on a real device.@ammarahm-ed Hi. Have you added a parameter pass for the GDPR?
Bundle extras = new Bundle(); extras.putString("npa", "1"); AdRequest request = new AdRequest.Builder() .addNetworkExtrasBundle(AdMobAdapter.class, extras) .build();
@KVinS what is this piece of code about ?
from react-native-admob-native-ads.
@KVinS what is this piece of code about ?
This is for the GPDR.
from react-native-admob-native-ads.
@KVinS Please share Logcat so we can fix the error
from react-native-admob-native-ads.
This has been fixed. Try the latest release, v0.3.6 @KVinS @joshuadiezmo @iamshrikantjha @bhavikgajera92 @aminghorbankhani try the example in the project. Now i have added full example for all use cases
from react-native-admob-native-ads.
your example app is not running properly showing this error
TypeError: undefined is not a function (near '...$$_REQUIRE(dependencyMap[3], "react-native-admob-native-ads").AdManager.registerRepository...')
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
but when I remove all AdManager.registerRepository from index.js the application runs but no ad display
from react-native-admob-native-ads.
@FayyazAliKhan1 Example app is working fine.
from react-native-admob-native-ads.
I mean the build is successful in iOS simulator but this error displays when metro bundler loads completely and the app is showing a white screen
from react-native-admob-native-ads.
further more I am using my own banner ids and it's almost 4 days that I have implemented it but still ads are not showing to me properly just the above ad logo and small purple box is showing,
from react-native-admob-native-ads.
@FayyazAliKhan1 The latest code with repositories is not released yet. Use the master branch instead if you want to try it out.
yarn add https://github.com/ammarahm-ed/react-native-admob-native-ads.git
You cannot use banner ids with this ad format. You need to generate Native Ad Ids in your Admob Account. Also note that do not use your ad ids in dev mode. Use test ids provided in admob. Read the docs.
from react-native-admob-native-ads.
@ammarahm-ed I used the master branch but the error is in version 0.5.0 but when I used version of your repo using
yarn add https://github.com/ammarahm-ed/react-native-admob-native-ads.git
which is version 0.6.0 is working in Android very well Thanks, but this version is failing the build of IOS, and showing the below error, please tell me what should I do for IOS.
from react-native-admob-native-ads.
Related Issues (20)
- How to Handle "Stop Seeing this Ad" and "Why This ad? " HOT 1
- Is there a way to use this with react native animated
- Default paused and muted not working in NativeMediaView HOT 2
- Google Ads intends to primarily move to real-time bidding
- [AD][FAILED]: The operation couldn’t be completed. ( error 3.) HOT 4
- Clicking on the Ad shows different Ad detail
- Clicking on the Ad shows different Ad detail
- Clicking on the Ad shows different Ad detail HOT 4
- I have added adchoicesPlacement but adchoices icon is not showing HOT 2
- I use NativeMediaView on iOS, but "Asset uses ImageView, not MediaView" is showing. HOT 13
- Invalid template ID: -1 affecting 40% of android user base HOT 5
- Getting template ID error... {"code": 0, "domain": "com.google.android.gms.ads", "message": "Invalid template ID: -1"} HOT 4
- [Question] Requested size
- NEED AN URGENT UPDATE (NOT WORKING)
- how to close native ad or render another ad?
- Adbadge, Headline, CallToActionView etc are showing in IOS but not showing in android HOT 1
- Successfully patched Failure to build "no visible @interface for 'GADRequestConfiguration' declares the selector 'tagForChildDirectedTreatment:'" HOT 5
- ERROR Ad failed to load {"code": 0, "domain": "com.google.android.gms.ads", "message": "Internal error."} HOT 5
- The Components Are Not Appearing
- "code": 0, "domain": "com.google.android.gms.ads", "message": "Internal error." HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-admob-native-ads.