A.G.
A.G.

Reputation: 2119

Do AdMob adUnitId have to be hardcoded in Android App?

Is the following implementation allowed by Google Play / Admob policies: on each start the app requests the adUnitId String from a server and uses it to request/show ads.

I plan to transfer an app to another developer. The app uses AdUnitId linked to my AdMob account. It would be good if after transferring the app, I would just change the AdUnitId string on the server, so that the earnings are credited to another developer immediately. (If strings have to be hardcoded, it takes a lot of time until all users update the app with the new AdUnitId).

Upvotes: 0

Views: 225

Answers (1)

Nana Ghartey
Nana Ghartey

Reputation: 7927

There's no policy about hardcoding adunit ids. According to the docs:

Note: Note that while we've hardcoded the ad unit ID into the activity class in >this example, the ID values can also be stored in string resource files.

I believe you can use the adunit IDs via a server as long as the implementation is done in your production app. For app testing, you should use text device IDs.

However, you should note that admob's updated (March 24, 2015) policies prohibits showing interstitials on app-loads and exits:

You should use a mobile ad splash screen if you intend displaying ads on app-loads. To do that, follow the official guideline

Upvotes: 1

Related Questions