Android Question Check to if Ads are blocked

MarcoRome

Expert
Licensed User
Longtime User
Hi all :)
Exist one way to check if ads are blocked ?
Type:
AdBlock Plus
NoRoot Ad-Remover Lite ( this is simple...disconnect wifi o inet about app )
etc.

I think that is possible utilize this Sub :

Sub Ad_FailedToReceiveAd (ErrorCode As String)
Log("failed: " & ErrorCode)
End Sub
Sub Ad_ReceiveAd
Log("received")
End Sub
Sub Ad_AdScreenDismissed
Log("screen dismissed")
End Sub

But i dont found documentation about ErrorCode. Any idea ?
Thank you all



 
D

Deleted member 103

Guest
We have a lot App to Block Ads.
1. App that lost Internet - but in this case a lot app dont work
2. App that working to file Hosts ( example AdAway ) - but we have code PendRush
3. App that working without file hosts ( example AdBlock Plus ) - but we have ErrorCode return 0

Found solution ( try with Adblock Plus, AdBlock Remover, Adway, etc. ) if:

B4X:
Sub Ad_FailedToReceiveAd (ErrorCode As String)
if ErrorCode = 0 then
    MsgBox("Disabilite AdsBlock. Bye Bye","Message")
    activity.finish
End Sub

+ code PendRush

B4X:
if TestBlocker = True then
...Bye Bye
end if

so with "both code" working very good.
Hi,
can this approach be used for IOS as well?
 
Upvote 0
Top