Will be a requirement to place the AdMob App ID in the manifest? or will be enough with java init?

2,368 views
Skip to first unread message

refle...@gmail.com

unread,
Oct 2, 2018, 2:48:54 AM10/2/18
to google-adm...@googlegroups.com
Hi

We need to work with apps that dinamically decides which ads SDK's or accounts initialize. The decisión is made during the execution of the app and is dynamic. With java code. 

For example, we use "MobileAds.initialize(this, "YOUR_ADMOB_APP_ID");" for setting the APP_ID

But now we can see this on AdMob kick-start guide: "Key Point: Placing your AdMob App ID in the manifest does not do anything yet, but will be a requirement in a future SDK release. We recommend you add this now to avoid running into errors when updating to that future SDK."

Will be a requirement? if so, it will destroy us. Please, can you tell me if will be optional and we will be able to initialize it by java code dynamically like now?

Thanks

mobileadssdk-a...@google.com

unread,
Oct 2, 2018, 5:40:46 AM10/2/18
to refle...@gmail.com, Google Mobile Ads SDK Developers
Hi,

I'm afraid as per the guide, placing your AdMob App ID in the manifest will be a requirement in a future SDK release.

That said, could you describe or tell us what is your conditional statement or scenario that will decide which AdMob App Id to initialize programmatically? You may share with us your code snippets as well.

Regards,
Ivan Bautista
Mobile Ads SDK Team




--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/2918604f-4afe-4a07-9156-3331645c2eae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

refle...@gmail.com

unread,
Oct 2, 2018, 2:31:22 PM10/2/18
to google-adm...@googlegroups.com
Hi

That are not my personal projects, are apps from the company in which I'm working. I can explain you the situation. The apps monetization is shared between two persons, so, sometimes the app display ads from an admob account and sometimes from another. Even sometimes display ads from other networks sdks. All of them are initialized dinamically. It will be a very problematic situation for us if we can't init admob dinamically just like now and just like the most part of the networks sdks.

Please, leave the users initialize the SDK dinamically and not in compilation time on the manifest. Leave the option to do it dinamically by java code. Can you?

mobileadssdk-a...@google.com

unread,
Oct 3, 2018, 2:20:28 AM10/3/18
to refle...@gmail.com, Google Mobile Ads SDK Developers
Hi,

Thank you for the clarification.

I was asking for the code snippets because I initially thought that you might be deciding which AdMob App Id to use based on specific device configurations, in which case, you can use alternative string resources instead for the different AdMob App Ids and just refer to the string resource in the meta-data in the manifest file.

However, from what you've described, it seems you are trying to programmatically set the AdMob App Id in the MobileAds.initialize() more than once (based on some conditions) within the app. If so, please note that as per guide, initializing the Mobile Ads SDK should only be done once. Thus, you can't initialize the SDK with an AdMob App id, then later on, somewhere in your app flow, you will re-initialize the SDK with a different AdMob App Id.

On the other hand, you can dynamically change the Ad Unit Id you wish to load ads to as long as they are associated with the same AdMob App Id.

Let me know if I misunderstood your concern.

Regards,
Ivan Bautista
Mobile Ads SDK Team


On 10/03/18 02:31:22 refle...@gmail.com wrote:
Hi

That are not my personal projects, are apps from my company. I can explain you the situation. The apps monetization is shared between two persons, so, sometimes the app display ads from an admob account and sometimes from another. Even sometimes display ads from other networks sdks. All of them are initialized dinamically. It will be a very problematic situation for us if we can't init admob dinamically just like now and just like the most part of the networks sdks.

Please, leave the users initialize the SDK dinamically and not in compilation time on the manifest. Leave the option to do it dinamically by java code. Can you?

El martes, 2 de octubre de 2018, 11:40:46 (UTC+2), mobileadssdk-a...@google.com escribió:
Hi,

I'm afraid as per the guide, placing your AdMob App ID in the manifest will be a requirement in a future SDK release.

That said, could you describe or tell us what is your conditional statement or scenario that will decide which AdMob App Id to initialize programmatically? You may share with us your code snippets as well.

Regards,
Ivan Bautista
Mobile Ads SDK Team




On 10/02/18 14:48:54 refle...@gmail.com wrote:
Hi

We need to work with apps that dinamically decides which ads SDK's or accounts initialize. The decisión is made during the execution of the app and is dynamic. With java code. 

For example, we use "MobileAds.initialize(this, "YOUR_ADMOB_APP_ID");" for setting the APP_ID

But now we can see this on AdMob kick-start guide: "Key Point: Placing your AdMob App ID in the manifest does not do anything yet, but will be a requirement in a future SDK release. We recommend you add this now to avoid running into errors when updating to that future SDK."

Will be a requirement? if so, it will destroy us. Please, can you tell me if will be optional and we will be able to initialize it by java code dynamically like now?

Thanks

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsubscrib...@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

refle...@gmail.com

unread,
Nov 16, 2018, 1:04:43 PM11/16/18
to Google Mobile Ads SDK Developers
Hi

Thanks and sorry for my late answer. OK I understand, but we still need to initialize dinamically admob. Because sometimes will be nececessary to init admob with a given id and sometimes will be necessary to init other SDK. All is dinamically decided in execution time. 

Please, can you give the possibility to init the admob app id with java code dinamically? Thank you.
Message has been deleted

mobileadssdk-a...@google.com

unread,
Nov 19, 2018, 4:53:02 AM11/19/18
to refle...@gmail.com, Google Mobile Ads SDK Developers
Hi,

I'm afraid starting SDK version 17.0.0, you may only initialize the SDK via setting the AdMob App Id in the manifest file which means that initialization of the Mobile Ads SDK will only be done once. 

Regards,
Ivan Bautista
Mobile Ads SDK Team


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

mobileadssdk-a...@google.com

unread,
Nov 19, 2018, 4:54:52 AM11/19/18
to Uday Singh, Google Mobile Ads SDK Developers, refle...@gmail.com
Hi Uday,

Thank you for providing the details of your concern.

We also received your Ad Unit Ids in question that you provided privately.

I tested your Ad Unit IDs and I was able to load ads at times, and other times, I'm getting No fill error which means that there are just no available ads at that moment. Also, I downloaded and run your Possible11 app and I was able to load a Banner Ad successfully. 

That said, please note that it is expected that at times there will be available ads and other times there will be none and I'm afraid the Mobile Ads SDK has no control over this. Given that sometimes you are able to load ads, on your end, then we can confirm that your SDK implementation is working correctly.

In addition, I noticed when testing your Interstitial Ad Unit ID, that at first, I was able to load an ad once or twice, then the succeeding ones always throw a No fill error. Then after waiting for some time, I tried it again and I was able to load an ad initially, but the succeeding ones throw a No fill error. This behavior seems to be in line with Frequency capping setting. If this is enabled on your end, then this could also affect Ad serving.

On the other hand, given that your Ad serving concern is different from the SDK initialization concern in this thread, for further assistance on this, please create a new thread and we'll continue the discussion from there.

Regards,
Ivan Bautista
Mobile Ads SDK Team




On 11/17/18 02:22:54 uday...@gmail.com wrote:

Hi Ivan,

Thanks for your kind response.

This issue happening for my all the apps as I have developed my apps in Android Studio Java/ Adobe Flash and Cordova Ionic3.

My other apps don't have much traffic only one app having good traffic that is Possible11(https://play.google.com/store/apps/details?id=in.learningapps.possible11) and it's developed in Cordova Ionic HTML/JS and used the admobpro plugin for it.

 

During this week ads(banner & Interstitial) are not displaying properly to any of my app. And the strange issue as:

1. As per my Indian time (IST), In morning hours, all ads are displaying perfectly and very fast.

2. In Afternoon sometimes ads are displaying and sometimes only banner displaying but not intertidal and sometimes nothing is displaying.

3. In the evening hours, nothing is displaying neither banner nor interstitial to any of my app. Due to this issue, Match rate are earning are getting down day by day.

 

Kindly do needful and try to resolve this issue. If you need any more info, please do let me know.

 

Publisher ID: pub-6644843787744460

 

Thanks,

Uday

+91-9701155575

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.

To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/c834d178-704f-43fb-9d90-654b09f378cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/813f86d1-3b4d-4c6f-a6d1-3c0ed9b5625e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Image removed by sender.

Virus-free. www.avg.com

 

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

refle...@gmail.com

unread,
Nov 19, 2018, 6:27:15 AM11/19/18
to Google Mobile Ads SDK Developers
Hi Ivan

Please, can you add a method for initializing it in execution time with java code like the normal ad units? 

I hope you can. 

mobileadssdk-a...@google.com

unread,
Nov 20, 2018, 1:11:36 AM11/20/18
to refle...@gmail.com, Google Mobile Ads SDK Developers
Hi,

I just want to correct my previous response and clarify that in addition to setting the AdMob App Id in the manifest file, you still need to use MobileAds.initialize() to initialize the SDK. However, as per the API reference, the MobileAds.initialize() method should only be called once per application launch.

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

refle...@gmail.com

unread,
Nov 20, 2018, 3:24:31 AM11/20/18
to Google Mobile Ads SDK Developers
Hi Ivan, thank you for your clarification. What will happen if we don't init by manifest but only by MobileAds.initialize() using java code? whould admob not serve ads?

mobileadssdk-a...@google.com

unread,
Nov 20, 2018, 5:59:09 AM11/20/18
to refle...@gmail.com, Google Mobile Ads SDK Developers
Hi,

I'm afraid starting SDK version 17.0.0, you need to set the AdMob App ID in the manifest file, otherwise, it will result to a crash with the message "The Google Mobile Ads SDK was initialized incorrectly".

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Admob user

unread,
Mar 12, 2019, 8:06:35 AM3/12/19
to Google Mobile Ads SDK Developers
why is adding to manifest requirement? Adversary can see the App Id from manifest and initiate fraudulent activity to get the App banned from Admob.

Admob instead of not counting invalid requests, bans the app, so I have encrypted the app Id and decrypt it during initialization, but now it is for the world to see the app Id.

please revert this.

mobileadssdk...@google.com

unread,
Mar 12, 2019, 10:31:36 PM3/12/19
to Admob user, Google Mobile Ads SDK Developers
Hi,

I will raise your concern to the team and get back to you for any feedback.

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Admob user

unread,
Mar 23, 2019, 3:34:12 AM3/23/19
to Google Mobile Ads SDK Developers
Hey Ivan,

Did you hear back from the team?

Thanks.

mobileadssdk...@google.com

unread,
Mar 25, 2019, 5:04:00 PM3/25/19
to Admob user, Google Mobile Ads SDK Developers
Hello there,

Ivan is OOO and I'll be assisting you with your question here. While we don’t recommend sharing your app ID with others, we don’t believe specifying app ID in manifest lowers the bar on app ID being discoverable by a hacker who really wants access to it.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Admob user

unread,
Mar 25, 2019, 7:31:48 PM3/25/19
to Google Mobile Ads SDK Developers
Hello Deepika,

Thank you for sharing your take on the matter.

Here are my concern

1. The app id in manifest is in plain text, even analyze apk command of android studio will show it. The competitor can easily see it, and he doesn't need to be dedicated, just simply need to analyze apk.

I fetch the encrypted app id from server and decrypt it(using pretty elaborate methods including calls to ndk. it raises the bar a little higher for the hacker) before sending request.

I would have had no issue in mentioning the app id manifest, but admob team hands out ban on invalid activity, and the admob policy team places the onus on the publisher to prevent invalid activity.

we don’t believe specifying app ID in manifest lowers the bar on app ID being discoverable by a hacker who really wants access to it.

Why does google team recommend using proguard, when it is just basic obfuscation? To raise the bar a little higher for the hacker. But here you are using different logic for sharing the app id as plaint text. Why is that?


The only use case I can think of providing the app id in manifest is to prevent people from using multiple app id in a single app. But that can be achieved in different ways without increasing the risk for all developers.

Thanks

mobileadssdk...@google.com

unread,
Mar 27, 2019, 12:25:46 PM3/27/19
to Admob user, Google Mobile Ads SDK Developers
Hi,

I'm Sam from the SDK eng team. To address your concerns, the app ID is already discoverable if someone is determined, it is not encrypted in network calls for example.

With respect to invalid activity, it's true that if someone had malicious intent they could abuse this information. However, our spam team does use multiple signals to detect spam and it would be very difficult for an individual to make it appear as though invalid activity is coming from one of your properties.

Hope this helps alleviate your concerns,

Regards

Sam


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

meihu

unread,
Jun 24, 2019, 9:42:47 AM6/24/19
to Google Mobile Ads SDK Developers
Hi,

We have two places to enter App ID (manifest and MobileAds.initialize() ), can I use two different App ID? one for the manifest, the other one for MobileAds.initialize() ? 

I still MobileAds.initialize()  only once in the application start, but can I programmatically decide which app id to use when I call  MobileAds.initialize()  (again only once at application start)?

Our situation: we have two owners of this app, we want to display Ads proportionally to different App ID, we understand we are only allow to  MobileAds.initialize()  only in application start. Just wondering if we are allowed to change App ID.

for example:
we have two App ID: AppID1, AppID2

1. User first start application, we call  MobileAds.initialize() to use AppID1, then close the application
2.  User start application the second time, we call  MobileAds.initialize()  to use AppID2

Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 24, 2019, 5:34:36 PM6/24/19
to meiheun...@gmail.com, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. Using two different App Ids is not considered as a good practice and we would suggest that you use only one App Id in both the places. And, if you have to use two different App Ids, the  App ID in the manifest file will be preferred.


Regards,
Deepika Uragayala
Mobile Ads SDK Team

 

ref:_00D1U1174p._5001UCZ9tJ:ref

meihu

unread,
Jun 24, 2019, 7:39:53 PM6/24/19
to Google Mobile Ads SDK Developers
Thank you for the quick response. I hope SDK team could support multiple App Id in the future, or come up with a way to allow multiple owners to monetize a single app.
Reply all
Reply to author
Forward
0 new messages