React-native-admob: testDeviveID="EMULATOR"

Created on 14 Jun 2016  路  4Comments  路  Source: sbugert/react-native-admob

Hi!

First of all thank you for share this component! :)

I would like to know which values can be placed at this property, and how can I use it.

Thanks!

Most helpful comment

From the AdMob docs:

Android

Remember to add a test device ID for each device that should request test ads. Device IDs are written to the system log by the Mobile Ads SDK, so you can find your device's ID by running your app and checking logcat.

The Mobile Ads SDK uses the tag "Ads" when writing to logcat. You can filter for that tag in Android Studio's logcat viewer, which makes it easier to find your device's ID.

iOS

For devices, check the logs in Xcode when running your app and making an ad request. You'll get a log that looks like this:

To get test ads on this device, call: request.testDevices = @[
@"2077ef9a63d2b398840261c8221a0c9b" ];

'EMULATOR' is special in this library because it maps to the corresponding constants on iOS (GAD_SIMULATOR_ID) and android (TEST_EMULATOR).
Hope that helps :)

All 4 comments

From the AdMob docs:

Android

Remember to add a test device ID for each device that should request test ads. Device IDs are written to the system log by the Mobile Ads SDK, so you can find your device's ID by running your app and checking logcat.

The Mobile Ads SDK uses the tag "Ads" when writing to logcat. You can filter for that tag in Android Studio's logcat viewer, which makes it easier to find your device's ID.

iOS

For devices, check the logs in Xcode when running your app and making an ad request. You'll get a log that looks like this:

To get test ads on this device, call: request.testDevices = @[
@"2077ef9a63d2b398840261c8221a0c9b" ];

'EMULATOR' is special in this library because it maps to the corresponding constants on iOS (GAD_SIMULATOR_ID) and android (TEST_EMULATOR).
Hope that helps :)

@sbugert thank you! This info really helps :)

Another question to clarify me about this parameter. If I want to submit my app to the App Store, I have to remove this parameter isn't it?

Thanks again!

Yes, AdMob will only show test ads in test mode. I doubt you would want that in production :)

Awesome @sbugert ! thanks! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vu-dang picture vu-dang  路  5Comments

MohsinTariq10 picture MohsinTariq10  路  6Comments

xencodes picture xencodes  路  4Comments

shinriyo picture shinriyo  路  3Comments

furkancelik picture furkancelik  路  5Comments