Bug 13780 - [Device only] Banner does not display on the device for AdMob android sample.
Summary: [Device only] Banner does not display on the device for AdMob android sample.
Alias: None
Product: Android
Classification: Xamarin
Component: Samples ()
Version: 4.8.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Peter Collins
Depends on:
Reported: 2013-08-06 12:14 UTC by Saurabh
Modified: 2013-08-20 12:15 UTC (History)
0 users

Is this bug a regression?: ---
Last known good build:

AdMob Sample (414.86 KB, application/zip)
2013-08-06 12:14 UTC, Saurabh

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Saurabh 2013-08-06 12:14:13 UTC
Created attachment 4552 [details]
AdMob Sample

Step to reproduce:
1. Open AdMob sample in XS
2. Open Main.axml of AdMobTest sample
3. Replace "your_ad_unit_id" with AdMob Publisher ID in ads:adUnitId
4. Open MainActivity.cs and replace AdRequest.TestEmulator with device identifier
5. Save the application and Run the application on the device

Actual result:
Application deploys successfully on the device successfully but banner does not display on the device. However, when we deploy this application on the emulator banner appears on the emulator screen like http://screencast.com/t/qgUtXyqh

Expected result:
Banner should display on the device screen same as it appears on emulator screen.

Device info: 
LG Nexus4 vession 4.3

Application output: https://gist.github.com/AkhileshKumar01/cf9616f68beefe68b803
Android device log: https://gist.github.com/AkhileshKumar01/b7d8c86f50e17ece9851

Environment info:
Mac OSX 10.8.1
Mono 3.2.1 ((no/e82c956)
XS 4.1.9(Build 5)-6d2fca80f9f6193c8991eff79d4ed39be596459b
Comment 1 Peter Collins 2013-08-20 12:15:22 UTC
In MainActivity.cs you must uncomment the line: 'adRequest.AddTestDevice (some_device_id)', and pass this method a device ID in order to have the banner display on device. By default this will only work on emulator without modifying MainActivity.cs

You can get the device ID of your connected device by running `adb devices`. Please reopen if this does not fix the issue reported.