How to implemwnt Admob on Whatsapp Stickers App
I tried for 3 days to implement it, and I was just able to make it work on one of the menus and the loading screen. I also want to ad interstitial ads when you add a sticker pack to WhatsApp, but I don't know how because it always crashes for me.
https://imgur.com/a/eLWtjfC
Literally, all that I have got working was made by trial and error. I don't know what to do because I have tried many things, but they haven't worked.
The code: https://github.com/WhatsApp/stickers
How I want it to look like and how I want ads to appear (i want ads to work like how they do in this app): https://play.google.com/store/apps/details?id=com.easycodes.animes
android android-studio admob whatsapp
add a comment |
I tried for 3 days to implement it, and I was just able to make it work on one of the menus and the loading screen. I also want to ad interstitial ads when you add a sticker pack to WhatsApp, but I don't know how because it always crashes for me.
https://imgur.com/a/eLWtjfC
Literally, all that I have got working was made by trial and error. I don't know what to do because I have tried many things, but they haven't worked.
The code: https://github.com/WhatsApp/stickers
How I want it to look like and how I want ads to appear (i want ads to work like how they do in this app): https://play.google.com/store/apps/details?id=com.easycodes.animes
android android-studio admob whatsapp
2
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59
add a comment |
I tried for 3 days to implement it, and I was just able to make it work on one of the menus and the loading screen. I also want to ad interstitial ads when you add a sticker pack to WhatsApp, but I don't know how because it always crashes for me.
https://imgur.com/a/eLWtjfC
Literally, all that I have got working was made by trial and error. I don't know what to do because I have tried many things, but they haven't worked.
The code: https://github.com/WhatsApp/stickers
How I want it to look like and how I want ads to appear (i want ads to work like how they do in this app): https://play.google.com/store/apps/details?id=com.easycodes.animes
android android-studio admob whatsapp
I tried for 3 days to implement it, and I was just able to make it work on one of the menus and the loading screen. I also want to ad interstitial ads when you add a sticker pack to WhatsApp, but I don't know how because it always crashes for me.
https://imgur.com/a/eLWtjfC
Literally, all that I have got working was made by trial and error. I don't know what to do because I have tried many things, but they haven't worked.
The code: https://github.com/WhatsApp/stickers
How I want it to look like and how I want ads to appear (i want ads to work like how they do in this app): https://play.google.com/store/apps/details?id=com.easycodes.animes
android android-studio admob whatsapp
android android-studio admob whatsapp
edited Nov 26 '18 at 1:57
Ishaan Javali
1,3402820
1,3402820
asked Nov 26 '18 at 1:38
ZerlinggZerlingg
144
144
2
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59
add a comment |
2
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59
2
2
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59
add a comment |
1 Answer
1
active
oldest
votes
It is quite hard to help you without more details, but i will tell you how i did it.
First, follow the instructions Admob Implementation
1- Download the dependencies:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
2 - In AndroidManifest.xml paste this code:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Where ADMOB_APP_ID is the id of your app that you set up on your admob account.
You should save that on strings.xml by the name of ADMOB_APP_ID.
It should look something like this:
android:value="@string/APPLICATION_ID"
** 3 - Now that you've done that, do the following:**
Paste this on layous/stickers_pack_details.xml:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
ads:adSize="BANNER"
ads:adUnitId="@string/ADD_UNIT_ID"
android:layout_marginStart="16dp">
</com.google.android.gms.ads.AdView>
Then, go to java/class/StickersPackActivity, and paste this:
MobileAds.initialize(this, getString(R.string.APPLICATION_ID));
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I won't go into details , you have to do some more stuff(for example, mAdView needs to be declared at the top, and your APPLICATION_ID needs to be declared on strings.xml in order to work)
It should look something like this(on strings.xml):
<string name="APPLICATION_ID">HERE_GOES_YOUR_APP_ID</string>
<string name="ADD_UNIT_ID">HERE_GOES_YOUR_ADD_UNIT_ID</string>
Now, you should be able to see your ads on your stickers app.
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%2f53473744%2fhow-to-implemwnt-admob-on-whatsapp-stickers-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is quite hard to help you without more details, but i will tell you how i did it.
First, follow the instructions Admob Implementation
1- Download the dependencies:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
2 - In AndroidManifest.xml paste this code:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Where ADMOB_APP_ID is the id of your app that you set up on your admob account.
You should save that on strings.xml by the name of ADMOB_APP_ID.
It should look something like this:
android:value="@string/APPLICATION_ID"
** 3 - Now that you've done that, do the following:**
Paste this on layous/stickers_pack_details.xml:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
ads:adSize="BANNER"
ads:adUnitId="@string/ADD_UNIT_ID"
android:layout_marginStart="16dp">
</com.google.android.gms.ads.AdView>
Then, go to java/class/StickersPackActivity, and paste this:
MobileAds.initialize(this, getString(R.string.APPLICATION_ID));
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I won't go into details , you have to do some more stuff(for example, mAdView needs to be declared at the top, and your APPLICATION_ID needs to be declared on strings.xml in order to work)
It should look something like this(on strings.xml):
<string name="APPLICATION_ID">HERE_GOES_YOUR_APP_ID</string>
<string name="ADD_UNIT_ID">HERE_GOES_YOUR_ADD_UNIT_ID</string>
Now, you should be able to see your ads on your stickers app.
add a comment |
It is quite hard to help you without more details, but i will tell you how i did it.
First, follow the instructions Admob Implementation
1- Download the dependencies:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
2 - In AndroidManifest.xml paste this code:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Where ADMOB_APP_ID is the id of your app that you set up on your admob account.
You should save that on strings.xml by the name of ADMOB_APP_ID.
It should look something like this:
android:value="@string/APPLICATION_ID"
** 3 - Now that you've done that, do the following:**
Paste this on layous/stickers_pack_details.xml:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
ads:adSize="BANNER"
ads:adUnitId="@string/ADD_UNIT_ID"
android:layout_marginStart="16dp">
</com.google.android.gms.ads.AdView>
Then, go to java/class/StickersPackActivity, and paste this:
MobileAds.initialize(this, getString(R.string.APPLICATION_ID));
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I won't go into details , you have to do some more stuff(for example, mAdView needs to be declared at the top, and your APPLICATION_ID needs to be declared on strings.xml in order to work)
It should look something like this(on strings.xml):
<string name="APPLICATION_ID">HERE_GOES_YOUR_APP_ID</string>
<string name="ADD_UNIT_ID">HERE_GOES_YOUR_ADD_UNIT_ID</string>
Now, you should be able to see your ads on your stickers app.
add a comment |
It is quite hard to help you without more details, but i will tell you how i did it.
First, follow the instructions Admob Implementation
1- Download the dependencies:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
2 - In AndroidManifest.xml paste this code:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Where ADMOB_APP_ID is the id of your app that you set up on your admob account.
You should save that on strings.xml by the name of ADMOB_APP_ID.
It should look something like this:
android:value="@string/APPLICATION_ID"
** 3 - Now that you've done that, do the following:**
Paste this on layous/stickers_pack_details.xml:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
ads:adSize="BANNER"
ads:adUnitId="@string/ADD_UNIT_ID"
android:layout_marginStart="16dp">
</com.google.android.gms.ads.AdView>
Then, go to java/class/StickersPackActivity, and paste this:
MobileAds.initialize(this, getString(R.string.APPLICATION_ID));
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I won't go into details , you have to do some more stuff(for example, mAdView needs to be declared at the top, and your APPLICATION_ID needs to be declared on strings.xml in order to work)
It should look something like this(on strings.xml):
<string name="APPLICATION_ID">HERE_GOES_YOUR_APP_ID</string>
<string name="ADD_UNIT_ID">HERE_GOES_YOUR_ADD_UNIT_ID</string>
Now, you should be able to see your ads on your stickers app.
It is quite hard to help you without more details, but i will tell you how i did it.
First, follow the instructions Admob Implementation
1- Download the dependencies:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
2 - In AndroidManifest.xml paste this code:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
Where ADMOB_APP_ID is the id of your app that you set up on your admob account.
You should save that on strings.xml by the name of ADMOB_APP_ID.
It should look something like this:
android:value="@string/APPLICATION_ID"
** 3 - Now that you've done that, do the following:**
Paste this on layous/stickers_pack_details.xml:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
ads:adSize="BANNER"
ads:adUnitId="@string/ADD_UNIT_ID"
android:layout_marginStart="16dp">
</com.google.android.gms.ads.AdView>
Then, go to java/class/StickersPackActivity, and paste this:
MobileAds.initialize(this, getString(R.string.APPLICATION_ID));
mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I won't go into details , you have to do some more stuff(for example, mAdView needs to be declared at the top, and your APPLICATION_ID needs to be declared on strings.xml in order to work)
It should look something like this(on strings.xml):
<string name="APPLICATION_ID">HERE_GOES_YOUR_APP_ID</string>
<string name="ADD_UNIT_ID">HERE_GOES_YOUR_ADD_UNIT_ID</string>
Now, you should be able to see your ads on your stickers app.
answered Dec 20 '18 at 2:48
Blast06Blast06
83210
83210
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%2f53473744%2fhow-to-implemwnt-admob-on-whatsapp-stickers-app%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
2
Please post some of your code in the question itself.
– Ishaan Javali
Nov 26 '18 at 1:47
what exactly? Theres a lot of code :/
– Zerlingg
Nov 26 '18 at 1:53
Do you not get any errors in the logcat? What is the error that you get? Why does your app crash?
– Ishaan Javali
Nov 26 '18 at 1:54
Nope, i never fins it, it just crashesh when i put the adds in certain menus, or it doesent crash but the ad never loads.
– Zerlingg
Nov 26 '18 at 1:59