checkUrl

abstract suspend fun checkUrl(url: String, sourceUrl: String? = null, resourceType: String? = null): SudoAdTrackerBlockerClient.CheckUrlResult

Checks a URL to determine if it is blocked according to current configuration.

Return

CheckUrlResult.BLOCKED if the URL should not be loaded, CheckUrlResult.ALLOWED if it is not blocked.

Parameters

url

The URL of the resource that should be checked against the currently active rulesets and the exceptions list

sourceUrl

The URL of the page that requested the url be loaded

resourceType

The MIME type of the resource indicated by the url, null if it is not known

Throws

FilterEngineNotReadyException

if the filtering engine is not ready.

Samples

com.sudoplatform.sudoadtrackerblocker.samples.Samples.checkUrl