midhunhk / ae-sticker-app

stickers for whatsapp
Other
34 stars 12 forks source link

No Ads...😭😢 #10

Closed ninetynin closed 2 years ago

ninetynin commented 2 years ago

I've been using test ads and it is not shwoing in app... and intersetial ads are not showing in your app too and my app too..pls check it out

midhunhk commented 2 years ago

Ads are showing up fine on the app. Just checked. I think I have disabled interstitial ads, as they seemed too much. lol.

Hope you have configured "google-services.json" correctly. I have not checked it into version control.

ninetynin commented 2 years ago

@midhunhk Hey thank for responding.... Oh yep I saw ads are showing on your app in play store.... but i've used your source code and kept my own admob ids but banner and intersetial both are not showing.... yes i've kept google-services.json...[uhmm im new to firebase so idk what to do..i've just downloaded google-services.json and pasted in project files...how to configure it] and can you pls say how to enable intersetial ads.... ah your reply makes me breathe again...😢 "I've tried so many but no other source code supports android 11 [when targetsdk30] but yours has ads issue [not issue maybe im doing something wrong]

midhunhk commented 2 years ago

Try once with test ads and see if they are showing up. It might take some time(or days) for them to show ads from adsense. Double check their documentation once.

Interstitials are working, you may have to look at the commit history. Because I removed them in the latest code since I felt like they were too much in the face.

N.B: I haven't updated this codebase in a while.

ninetynin commented 2 years ago

@midhunhk ya i used test ads at beginning it isnt showing test ads too [since intersetial is disabled its might not show but banner test ad is also not showing thats why i tried my own ids but it doesnt work that way too 😢 do you know which version is the one you didnt disable intersetial...

and have you ever faced issue in this app like stickers are not adding for android 11 [because i can see it in all other source codes except yours if yes pls say how did you resolve it

midhunhk commented 2 years ago

Checkout this commit https://github.com/midhunhk/ae-sticker-app/commit/6f0acbb6029f33e4684c9ccb69b5dcefdf468f47 on the branch "interstitial".

Also I have moved on to iPhone as my daily driver and my Galaxy S9 is running Android 10. So I haven't tested anything on Android 11 and up.

ninetynin commented 2 years ago

ah i used that commit and changed it and but when i changed everything and run the app the app is closing on its own do you know any sol.. or do you know which release [https://github.com/midhunhk/ae-sticker-app/releases] contains intersetial ads working properly.. in mean while time i will try to do freshly again....

midhunhk commented 2 years ago

Try to launch on emulator and see what exception is being thrown.

I had to make some changes to the code after upgrading a few of the libraries later, this might be the cause of your issues. But the code for Interstitial ads should be similar, but check the updated documentation: https://developers.google.com/admob/android/interstitial

From my changelog I can see I added Interstitial adds in 1.1.0 and removed in 1.2.0, however I did not tag that release. https://github.com/midhunhk/ae-sticker-app/blob/main/Changelog.md

ninetynin commented 2 years ago

@midhunhk image I am getting this error and app is closing on its own... and there is no 1.1.0 in releases there is 1.0.0 and 1.2.0 however I did not try again [I mean freshly becuase I might have made some mistakes while implementing intersetial ads...] should i share this source code [will you check it out?]

ninetynin commented 2 years ago

I tried again and image i didnt do anything and there are no banner ads too 😭 pls once check it out... not yours but the source code on github... i didnt try interstetial yet because there are no banner.... wait a second...[do we need to do something in firebase to show ads in app? because i added google-services.json but didnt do anything in firebase...] pls help me...there are so many negative reviews on my app for android 11 issues... I found sol on yours but no ads 😢 @midhunhk

midhunhk commented 2 years ago

As far as I remember, google-services.json is only for analytics. You can remove the references to the same from my app's source code.

Could you follow this guide on Admob https://developers.google.com/admob/android/quick-start https://developers.google.com/admob/android/banner

Also please see AdResources.getInterstitial() which is called from StickerPackListActivity.onCreate(), but is commented out for now. It will load the adId (google_admob_interstitial_id) from admob.xml in the values folder. I have set it as the Test ad id in the repository.

ninetynin commented 2 years ago

@midhunhk bro I've tried as you said but still there are no ads {idk java} thats why I installed https://github.com/midhunhk/ae-sticker-app/tree/interstitial this and tried this but I am not getting ads on this one too 😢 {and i got a msg unable to load ad at beginning but thats it i didnt got any msg to take scrsht again} can you pls once try yours and see if ads are working for you?

ninetynin commented 2 years ago

and btw do you remember how did you add support for android 11... because https://github.com/midhunhk/ae-sticker-app/tree/interstitial in this there is no support for android 11.... I changed targetsdk from 28 to 30 and theres no use i cant add stickers....thats why...but your latest version works.... if you remember what you did when changing sdk 28 to 30{like adding something other} then I can use that on my previous source code 😭 @midhunhk

midhunhk commented 2 years ago

Yes, bro. I checked and the ads are showing for me. Is there anything about the admob account that is causing the issue. Please check the following links.

https://support.google.com/admob/answer/9469204?hl=en https://stackoverflow.com/a/6986081/592025

And I said earlier, I have switched to iPhone as my daily driver and my Android device is stuck at Android 10. So I haven't updated any of my Android apps in more than a year.

ninetynin commented 2 years ago

@midhunhk I dont think its my admob acc issue because i faced a temporary adblock 2 months ago but its solved now and ads are showing in other apps... and even if thats the problem I as using test ads so it isnt related to my acc right? [because in every test ads i used they showed as test ads and no issues] @midhunhk [NO i dont mean to check in your app that is in play store.... I mean to import https://github.com/midhunhk/ae-sticker-app this and run and see if ads are working }

midhunhk commented 2 years ago

Just ran the latest code from @main branch on Android Emulator. image

I also tried with my original 'app-id' and 'banner-ad-id', still it is displaying Test ads on emulator. I think AdMob always considers requests from an emulator as Test Ads and responds like that.

ninetynin commented 2 years ago

image what is happening? 😭 Did you do anything after importing project except running...?? Because i just runned the project thats it I didnt touch or change anything...?{excpet keeping google-services.json] @midhunhk

ninetynin commented 2 years ago

I have a adblocker but it I removed it long time ago I thought maybe because of it...but no I tried in my firends pc and no use he isnt getting ads too.... Ah you imported from main and tried right and the one you kept is not on your pc's right? becoz when i uploaded some files didnt get added in github before in some other project? @midhunhk

midhunhk commented 2 years ago

I used the real values for appId and banner-ad-id from my AdMob account.

https://github.com/midhunhk/pnr-status-app The above is an older project from that also has AdMob ads on it. Once ads are showing up on your app, it's easy to add Interstitial ads too.

ninetynin commented 2 years ago

yeah i tried using real ad ids and no use.... 😢

and what is that pnr status app I didnt understand.... ah forget all this.... I have a way..... go to file -> export -> export as zip and pls share it in drive or github new one upload as a zip file in github but not directly from android studio because when uploading from android studio to github some files are missing... or upload that zip file here https://wetransfer.com and what can i do with your ids.... so it doesnt matter if you change them or not... @midhunhk pls do it bro becuase i tried with real ids and no use either in real phone or emulator

midhunhk commented 2 years ago

I have the zip file ready, please let me know your email id or somewhere I can send the file.

ninetynin commented 2 years ago

thanks you so much 😭 in case mail you can send it to anand92004@gmail.com

midhunhk commented 2 years ago

Let me know if you got the email from Google Drive for sharing the file. Exported from Android Studio directly, where it is showing test ads in the emulator.

ninetynin commented 2 years ago

(removed screenshot) yes it seems to be working on emulator now.... but not working on a real phone 😰

ninetynin commented 2 years ago

will ads show on real device when it is published on play store? because i thought its my device problem for ads as it is showing on my device but it isnt showing on other phones too [working in emulator only] I mean like are ads enabled for emulator only?

midhunhk commented 2 years ago

Test ads come for emulator. I've seen that in the documentation.

ninetynin commented 2 years ago

hey @midhunhk pls check this out https://github.com/midhunhk/ae-sticker-app/commit/6f0acbb6029f33e4684c9ccb69b5dcefdf468f47#commitcomment-62288605 ae-sticker-app.zip

and in case you wanna test it out click on the above ae-sticker-app.zip

midhunhk commented 2 years ago

on StickerPackListActivity.initAd(), use the below line

adResources = new AdResources();

instead of

AdResources adResources = new AdResources();

I am able to see test ads in the emulator now.

ninetynin commented 2 years ago

on StickerPackListActivity.initAd(), use the below line

adResources = new AdResources();

instead of

AdResources adResources = new AdResources();

I am able to see test ads in the emulator now.

image I am using that only right? is this the correct one or is it in another place?

midhunhk commented 2 years ago

You need to use adResources = new AdResources(); We need to set the global variable instead of creating a local variable. It was throwing a NullPointerException earlier

On Tue, Dec 21, 2021 at 12:41 PM ananddvn04 @.***> wrote:

on StickerPackListActivity.initAd(), use the below line

adResources = new AdResources();

instead of

AdResources adResources = new AdResources();

I am able to see test ads in the emulator now.

[image: image] https://user-images.githubusercontent.com/91336664/146974581-4f9af5ae-4a5b-4ee0-b826-6a892c1393b3.png I am using that only right? is this the correct one or is it in another place?

— Reply to this email directly, view it on GitHub https://github.com/midhunhk/ae-sticker-app/issues/10#issuecomment-998972231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPO2QJV34T62JVANWWTRL3USC35BANCNFSM5J5IRK7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Thanks and Regards, Midhun Harikumar

ninetynin commented 2 years ago

@midhunhk
oh my bad.... its working and image you can see ad not loaded msg here {do you know why im getting this... and im not getting intersetial test ads}

midhunhk commented 2 years ago

I hope you are using the below line in initAd(), and setting the appropriate adId for interstitial ads (e.g; AdUnitId("ca-app-pub-3940256099942544/1033173712"))

interstitialAd.loadAd(new AdRequest.Builder().build());

On Tue, Dec 21, 2021 at 12:50 PM ananddvn04 @.***> wrote:

oh my bad.... its working and [image: image] https://user-images.githubusercontent.com/91336664/146975632-aeecbe70-7014-4746-bb0e-7eeb8f6733ca.png you can see ad not loaded msg here {do you know why im getting this... and im not getting intersetial test ads}

— Reply to this email directly, view it on GitHub https://github.com/midhunhk/ae-sticker-app/issues/10#issuecomment-998977813, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPO2QIY3LPX2YXVFIUURXTUSC47TANCNFSM5J5IRK7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Thanks and Regards, Midhun Harikumar

ninetynin commented 2 years ago

I hope you are using the below line in initAd(), and setting the appropriate adId for interstitial ads (e.g; AdUnitId("ca-app-pub-3940256099942544/1033173712")) interstitialAd.loadAd(new AdRequest.Builder().build()); … On Tue, Dec 21, 2021 at 12:50 PM ananddvn04 @.> wrote: oh my bad.... its working and [image: image] https://user-images.githubusercontent.com/91336664/146975632-aeecbe70-7014-4746-bb0e-7eeb8f6733ca.png you can see ad not loaded msg here {do you know why im getting this... and im not getting intersetial test ads} — Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPO2QIY3LPX2YXVFIUURXTUSC47TANCNFSM5J5IRK7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.> -- Thanks and Regards, Midhun Harikumar

yeah i am using it correct for this interstitialAd.loadAd(new AdRequest.Builder().build()); image i tried with the default ones [maybe those are yours & mine & test ads } no use.... still getting same ad not loaded message 😢

midhunhk commented 2 years ago

Are you using the too?

Also maybe you could fork this project and make your changes on top of it. That way others can also check and update if you are stuck.

ninetynin commented 2 years ago

the too? i didnt understand..... yeah i will try to do that...

Are you using the too?

Also maybe you could fork this project and make your changes on top of it. That way others can also check and update if you are stuck.

ninetynin commented 2 years ago

@midhunhk Ivs started using github a month ago so Im still learning.... can you say how to apply changes i made into the project i forked

midhunhk commented 2 years ago

the too? i didnt understand..... yeah i will try to do that...

Are you using the too? Also maybe you could fork this project and make your changes on top of it. That way others can also check and update if you are stuck.

I meant the TestAd app id: Test AdMob App ID: ca-app-pub-3940256099942544~3347511713

Test Interstitial ad: ca-app-pub-3940256099942544/1033173712

midhunhk commented 2 years ago

@midhunhk Ivs started using github a month ago so Im still learning.... can you say how to apply changes i made into the project i forked

  1. Go to 'https://github.com/midhunhk/ae-sticker-app'
  2. Click on the 'Fork' button on the top right, and fork it to your profile.
  3. Checkout the forked project to your PC
  4. Make your customizations and commit back to Github
ninetynin commented 2 years ago

@midhunhk https://github.com/ananddvn04/ae-sticker-app/commit/8bbfb4ae8a118439f80edca8c5a3dd4cb49f5541 here check this out I've changed like this.... now banner ads are also not coming

ninetynin commented 2 years ago

@midhunhk bro you there 😢

midhunhk commented 2 years ago

Checked out your code, and Test ads are appearing after I updated the admob.xml to real values from my admob account. I did not make any code changes at all, apart from the xml. Will send those details to you in an email.

Not sure why the "TestAd id's" are not working. Screenshot_20211222_104137 Screenshot_20211222_104031

ninetynin commented 2 years ago

image yeah it seems to be working.... thank you very much

ninetynin commented 2 years ago

@midhunhk 😭 https://github.com/ananddvn04/ae-sticker-app/commit/0749ed39a75f324d03dfd95de3364766908c60a1 it was working fine before changing package name... but after changing it to com.ananedexp.brawlstarspinforwhatsappsticker from com.ae.apps.stickerapp its not working again... now ads are not showing and android 11 support is gone image and i am getting this error

ninetynin commented 2 years ago

Checked out your code, and Test ads are appearing after I updated the admob.xml to real values from my admob account. I did not make any code changes at all, apart from the xml. Will send those details to you in an email.

Not sure why the "TestAd id's" are not working. Screenshot_20211222_104137 Screenshot_20211222_104031 @midhunhk forget about above msg it was my emulator problem it didnt have whatsapp thats why im getting this error...but idk why i didnt got this msg before when i dont have whatsapp then too... but when i changed package name from com.ae.app.stickerapp to com.ae.stickerapp the ads are not working again bro.... here https://github.com/ananddvn04/ae-sticker-app you can see it here [i mean changes] 😢

midhunhk commented 2 years ago
  1. The package name needs to be on Google Play, i.e; the app needs to be published with that package
  2. Select that app in your Admob account to enable ads and get the ad ids
  3. The package id is defined on AndroidManifest.xml with the line "<manifest package="com.anandexp.brawlstarspinwhatsappstickers""
ninetynin commented 2 years ago

image my app is already on play store im trying to change it to yours I used ad ids from there only.... and image manifest already has that.....

  1. The package name needs to be on Google Play, i.e; the app needs to be published with that package
  2. Select that app in your Admob account to enable ads and get the ad ids
  3. The package id is defined on AndroidManifest.xml with the line "<manifest package="com.anandexp.brawlstarspinwhatsappstickers""
ninetynin commented 2 years ago

@midhunhk ive tried with test ad id , the one you gave , mine freshly from beginning no use.... im not getting ads.... 😢 should i share zip file? can you pls check it out... or https://github.com/ananddvn04/ae-sticker-app/commit/0749ed39a75f324d03dfd95de3364766908c60a1 here ads are not showing from this commit before that ads are showing...

midhunhk commented 2 years ago

Are ads enabled for the package id "com.anandexp.brawlstarspinwhatsappstickers" in AdMob? There shouldn't be any code issue.

ninetynin commented 2 years ago

arent all ids enabled by default..... will i get ads when i publish the app in play store then [i mean update]

Are ads enabled for the package id "com.anandexp.brawlstarspinwhatsappstickers" in AdMob? There shouldn't be any code issue.

midhunhk commented 2 years ago

yes, that should be the case.