It's an Android Library that permit custom properties and remove ads from embed websites using WebView:
- Removed ads from the webview ✔
- Add a custom blocker for the user ✔
- Add a metadata capture for every website that blocks (To-do)
- Uqload
- Mp4Upload
- DoodStream
- Filelions
- Filemoon
- VidGuard
- LuluStream-Luluvdo
- Streamtape
- Okru
- StreamWish
- Voe
- Senvid
- Anonfiles
- Bayfiles
- Fembed
- Mega
- YourUpload
- Maru
- GoodStream
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation("com.github.darkryh:NoMoreAdsOnMyWebViewPlayer:$version")
}
This example is to make compatible with a custom site that contains this media players.
class MainActivity : ComponentActivity() {
fun onCreate() {
setContent {
AndroidView(
modifier = modifier.fillMaxSize(),
factory = { context ->
NoMoreAdsWebView(context).apply {
/**
* When setting the webViewClient
* the instance has to be NoMoreAdsWebView
* to work in a correctly way
*/
webViewClient = object : BlockerClient() {
/**
* Exceptions key words that let known
* the blocker doesn't have to block
*/
override val exceptionWordKeys: List<String>
get() = listOf(
"meta",
"subdomain.meta",
"subdomain.related.to.site"
)
}
loadUrl("https://www.facebook.com/")
}
}
)
}
}
}
Options available to the client the other ones still the same options.
class MainActivity : ComponentActivity() {
fun onCreate() {
setContent {
AndroidView(
modifier = modifier.fillMaxSize(),
factory = { context ->
NoMoreAdsWebView(context).apply {
/**
* Replacement option for ShouldOverrideUrlLoading(view, request)
*/
override fun onOverrideUrlLoading(
view: WebView?,
request: WebResourceRequest?
): Boolean {
/**
* Do your logic
*/
return super.onOverrideUrlLoading(view, request)
}
/**
* Replacement option for ShouldInterceptRequest(view, request)
*/
override fun onInterceptRequest(
view: WebView?,
request: WebResourceRequest?
): WebResourceResponse? {
/**
* Do your logic
*/
return super.onInterceptRequest(view, request)
}
}
}
)
}
}
}
@Composable
fun NoMoreAdsWebView(modifier: Modifier = Modifier) {
AndroidView(
modifier = modifier.fillMaxSize(),
factory = { context ->
NoMoreAdsWebView(context).apply {
loadUrl("your embed url")
}
}
)
}
And loading as a normal webview.
<com.ead.lib.nomoreadsonmywebviewplayer.NoMoreAdsWebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
If you want to help or collaborate, feel free to contact me on X account @Darkryh or just make a request.