invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
625 stars 121 forks source link

fix(android): Fixed map the commands #590

Open minhchienwikipedia opened 5 days ago

minhchienwikipedia commented 5 days ago

Description

Seems you guys missing to convert the commands from string to number, I just added changes to fix it and make some function triggers by command work.

Related issues

Release Summary

Checklist

Test Plan


Think react-native-google-mobile-ads is great? Please consider supporting the project with any of the below:

CLAassistant commented 5 days ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

dylancom commented 2 days ago

The string is already parsed to an integer so I don't understand what this fixes. Integer.parseInt(commandId)

This could be made redundant by changing the parameter directly to int commandId.

minhchienwikipedia commented 2 days ago

@dylancom the commandId is "load", "recordManualImpression" -> so it can't be parseInt, you can try to test it you will get the error. So I think you guys are missing the map command string to the command number. I had tested it and it works for me

dylancom commented 2 days ago

Hmm I see it's broken now in our example app. Might be related to the new arch.

dylancom commented 1 day ago

I'm currently on a holiday so I don't have time to test this thoroughly on both archs. @mikehardy / others? 👀