How to create a banner ad with admob and android studioIs there a way to run Python on Android?How do save an Android Activity state using save instance state?Create ArrayList from arrayHow can I create an executable JAR with dependencies using Maven?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?How do I fix android.os.NetworkOnMainThreadException?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?
How long can fsck take on a 30 TB volume?
Why do 3D printers have only one limit switch?
What is the radius of the circle in this problem?
Is there any evidence to support the claim that the United States was "suckered into WW1" by Zionists, made by Benjamin Freedman in his 1961 speech
How did Captain Marvel know where to find these characters?
Does Thread.yield() do anything if we have enough processors to service all threads?
Unicode-math and mathrm result in missing symbols
Why Faces eat each other?
Using wilcox.test() and t.test() in R yielding different p-values
Pre-1993 comic in which Wolverine's claws were turned to rubber?
Are wands in any sort of book going to be too much like Harry Potter?
What replaces x86 intrinsics for C when Apple ditches Intel CPUs for their own chips?
Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019
Renting a house to a graduate student in my department
Are double contractions formal? Eg: "couldn't've" for "could not have"
Two (probably) equal real numbers which are not proved to be equal?
How is it possible for this circuit to continue functioning correctly?
Rusty Chain and back cassette – Replace or Repair?
Company stopped paying my salary. What are my options?
if i accidentally leaked my schools ip address and someone d doses my school am i at fault
Double underlining a result in a system of equations with calculation steps on the right side
Is every story set in the future "science fiction"?
How does weapons training transfer to empty hand?
How can I make parentheses stick to formula?
How to create a banner ad with admob and android studio
Is there a way to run Python on Android?How do save an Android Activity state using save instance state?Create ArrayList from arrayHow can I create an executable JAR with dependencies using Maven?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Is there a unique Android device ID?How do I fix android.os.NetworkOnMainThreadException?Creating a memory leak with JavaProper use cases for Android UserManager.isUserAGoat()?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.
sample Ad unit ID: ca-app-pub-3940256099942544/6300978111
sample App ID: ca-app-pub-3940256099942544~3347511713
my Ad unit ID: ca-app-pub-3034909524223644/38127934
my App ID: ca-app-pub-3034909524223644~23360602
I've used this ad unit id in an old application and it working
what should i do?
AndroidManifest.xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3034909524223644~2336060216" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
Layout.xml
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />
Main
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
View view =inflater.inflate(R.layout.fragment_home, container, false);
AdView adView = (AdView) view.findViewById(R.id.adView);
runAds(adView);
return view;
protected void runAds(AdView adView)
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);
dependencies
dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
java android admob
add a comment |
I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.
sample Ad unit ID: ca-app-pub-3940256099942544/6300978111
sample App ID: ca-app-pub-3940256099942544~3347511713
my Ad unit ID: ca-app-pub-3034909524223644/38127934
my App ID: ca-app-pub-3034909524223644~23360602
I've used this ad unit id in an old application and it working
what should i do?
AndroidManifest.xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3034909524223644~2336060216" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
Layout.xml
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />
Main
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
View view =inflater.inflate(R.layout.fragment_home, container, false);
AdView adView = (AdView) view.findViewById(R.id.adView);
runAds(adView);
return view;
protected void runAds(AdView adView)
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);
dependencies
dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
java android admob
add a comment |
I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.
sample Ad unit ID: ca-app-pub-3940256099942544/6300978111
sample App ID: ca-app-pub-3940256099942544~3347511713
my Ad unit ID: ca-app-pub-3034909524223644/38127934
my App ID: ca-app-pub-3034909524223644~23360602
I've used this ad unit id in an old application and it working
what should i do?
AndroidManifest.xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3034909524223644~2336060216" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
Layout.xml
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />
Main
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
View view =inflater.inflate(R.layout.fragment_home, container, false);
AdView adView = (AdView) view.findViewById(R.id.adView);
runAds(adView);
return view;
protected void runAds(AdView adView)
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);
dependencies
dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
java android admob
I've Tried to run ad with my App ID and Ad unit id ,it didn't show anything but when I used sample App ID and Ad unit id it shows sample ads.
sample Ad unit ID: ca-app-pub-3940256099942544/6300978111
sample App ID: ca-app-pub-3940256099942544~3347511713
my Ad unit ID: ca-app-pub-3034909524223644/38127934
my App ID: ca-app-pub-3034909524223644~23360602
I've used this ad unit id in an old application and it working
what should i do?
AndroidManifest.xml
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3034909524223644~2336060216" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
Layout.xml
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3034909524223644/3812793416" />
Main
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
View view =inflater.inflate(R.layout.fragment_home, container, false);
AdView adView = (AdView) view.findViewById(R.id.adView);
runAds(adView);
return view;
protected void runAds(AdView adView)
AdRequest adRequest = new AdRequest.Builder()
.setRequestAgent("android_studio:ad_template").build();
adView.loadAd(adRequest);
dependencies
dependencies
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:26.0.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.lecho:hellocharts-library:1.5.8@aar'
implementation 'com.google.android.gms:play-services-ads:17.1.1'
java android admob
java android admob
edited Apr 2 at 12:45
Alireza Amirkhani
asked Mar 23 at 8:48
Alireza AmirkhaniAlireza Amirkhani
33
33
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.
add a comment |
If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312096%2fhow-to-create-a-banner-ad-with-admob-and-android-studio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.
add a comment |
I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.
add a comment |
I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.
I had the same issue. your Ad unit id will not show live Ads till your app is live. Test ad will show only test ads. I had recently uploaded one app which is showing live ads after I roll-out app to the Beta-release.
edited Mar 23 at 9:28
answered Mar 23 at 9:16
pradip tilalapradip tilala
571518
571518
add a comment |
add a comment |
If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.
add a comment |
If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.
add a comment |
If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.
If you just created you ads id, it may happen. Ads normally take 5 to 24 hours to show after creation of ad id.
answered Mar 23 at 8:51
Touhidul IslamTouhidul Islam
1,5201516
1,5201516
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55312096%2fhow-to-create-a-banner-ad-with-admob-and-android-studio%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown