How to test if user has tempered admob work on android device

465 Views Asked by At

I've an android app in production for a very long time, my app has consistently 5k daily users and recently I decided to monitor Android Admob SDK errors (using firebase).

I noticed that some users keep receiving same error, again and again when the sdk tries to load an ad

failed to load: Unable to obtain a JavascriptEngine. (0)

also:

failed to load: Network error. (2)

Network error might sounds that the user is without internet, but my app wont pass by SplashScreen if user has no internet, so if any code tried to load ad at all the user connection was tested prior to it.

These errors are irrecoverable, I mean, when one of them happen to a user, it will happen to all ad formats (banner, interstitital...) and it will be happening forever, no ad will be served to this user at all.
I recently learned that there are some apps available that claim to remove ads, for exemple: https://www.luckypatchers.com/download/ (and many others)

I didnt dig deep enough to check how any of theses apps manage to block admob's work, but clearly they do. My question is, is there a definitive way to check if the Admob is tempered?

Please dont suggest: "test if user has installed 'luckypatchers' there are dozens of apps like this and this test is most likely to fail", I also would like a test which is not going to report on a user who has a legitimate connection problem.

Does anyone know a solution for that? BTW: I was passed the time for google admob to have a method "Admob.TestAdmobOnThisDevice" to simple check it.

1

There are 1 best solutions below

4
On
  • If user is connected to internet and ad is not loading.

  • Then you can use onAdfailed listener and if ads are not loading then you can make the user exit the app (use some delay before making the user exit)