-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Android] UnityAds does not load with Mediation #1792
Comments
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions. |
No Mr. bot, I made a PR ... |
Pinned it 🙈 thanks again for the PR, will take a look once CI is back to normal |
@Salakar Thank you very much! |
haha - I think we fixed this one! |
Hi @wasedaigo Do you know how to fix it? 🆘 🙏 |
I am not using ReactNative anymore so... I don't know! https://github.com/invertase/react-native-firebase/pull/1892/files |
Anyone found out how to fix this ? I'm using the latest version of package.json
app/build.gradle
|
I was able to display Unity ads with this fix |
@zyzo if that's something we need to change, I would happily collaborate to merge a PR if you posted one. One thing to pay attention to in react-native is that it is possible at any time that the Activity context is unexpectedly null when you ask for it, because the Activity react-native uses can go away before the native request has asynchronously been passed down to native and started executing. But if you just carefully check for null when request the activity context and have a reasonable fallback (and maybe a native info log message for developers so they know what happened when the ad failed to load rarely) then it could be an easy PR |
However without the Activity context it won't even load.
It also applies on Interstitial Ads |
fix Releasing as 10.8.1 right now, thanks! |
🔥🔥🔥
Issue
RewardedVideo of UnityAds does not show up on Android with Admob Mediation
I found the following warning
Changing getContext() into getActivity() fixed the problem, however I do not know if this is the right solution. (I modified the following line)
https://github.com/invertase/react-native-firebase/blob/master/android/src/main/java/io/invertase/firebase/admob/RNFirebaseAdMobRewardedVideo.java#L28
I assume other mediation adapters such as adcolony, appodeal also have the same issue, as I read somewhere they also need activity context.
Project Files
Android
iOS
Environment
Android API 21
N/A
N/A
N/A
Android Studio 3.2
React Native
version:0.57.4
React Native Firebase
library version:5.1.0
Firebase
module(s) you're using that has the issue:TypeScript
?N/A
ExpoKit
?ExpoKit
N/A
The text was updated successfully, but these errors were encountered: