Android Question Firebase Admob Ads increasing Cache

marcelo_efn

Member
Licensed User
Longtime User
Hello everyone
Need help.
I use Firebase Admob in my application
I noticed that displaying the ads increases the cache size. In this way, the application starts to slow down and crash.
How to solve this?
(sorry for my bad english)

B4X:
Dim adSize As JavaObject
adSize.InitializeNewInstance("com.google.android.gms.ads.AdSize", Array(320, 50))
Dim BannerAd As AdView
BannerAd.Initialize2("BannerAd", "ca-app-pub-9999999999999999/9999999999", adSize)
panel1.AddView(BannerAd,(panel1.Width/2) -160dip,0dip,320dip,50dip)
BannerAd.LoadAd
 

marcelo_efn

Member
Licensed User
Longtime User
Thanks for answering.

I noticed an increase in the cache when consulting the Application information in the device settings.
If not the cache what could it be?

The application does not display an error message as it does not get to abort or terminate. But it is getting very slow.

In initial moments when no ad is shown yet, the application works well. Just start showing ads that the application gets very slow.

This BannerAd routine is in the Activity_Create sub. I added this routine to almost all Activitys in the application.

Users browse Activits multiple times.
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
By the way, I noticed that after adding ads, the size of the app on the device increases. This has been happening for a long time. The clean application keeps its size all the time .. Interestingly, the size of the application on the test units does not change, it is the same all the time ... You can easily check it, just run and close the application several times ... From the initial 27MB after a year of use application is almost 50MB
 
Upvote 0

marcelo_efn

Member
Licensed User
Longtime User
It may be a coincidence, but when the cache is cleared manually in the device settings, the application works better.
Could it be high memory consumption by the ads that would be causing the app to slow down?
Any suggestion?
 
Upvote 0

marcelo_efn

Member
Licensed User
Longtime User
I managed to solve by adjusting the display code of the ads. Now the application does not increase in size and works very light.
Thanks @Erel
This threads can be closed.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…