Home > Software design >  How to disable WebViewChromium from initializing
How to disable WebViewChromium from initializing

Time:12-08

I'm working on improving the cold start time of several apps. One of the apps has a process that occurs during the bindApplication phase of startup, called "WebViewChromium.init. Our other application doesn't have this, and I can't figure out where in my code I'm including something that may reference WebViews or Chromium anywhere.

If possible I'd like to remove it from the startup process, as it's overhead I don't think I need.

enter image description here

Here are all of my build.gradle dependencies:

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
compileOnly 'com.google.android.wearable:wearable:2.9.0'
implementation 'com.google.android.support:wearable:2.9.0'
implementation 'androidx.mediarouter:mediarouter:1.3.1'

// Billing
implementation 'com.android.billingclient:billing:4.1.0'

// Paging
implementation 'androidx.paging:paging-runtime-ktx:3.1.1'

//Firebase/bug reporting
implementation platform('com.google.firebase:firebase-bom:31.0.0')
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-messaging-ktx'
implementation 'com.google.firebase:firebase-inappmessaging-display-ktx'
implementation 'com.bugsnag:bugsnag-android-core:5.1.0'
implementation "de.cketti.mailto:email-intent-builder:2.0.0"

//Admob/Play Store
api 'com.google.android.gms:play-services-ads:21.3.0'
implementation 'com.google.android.play:core:1.10.3'

implementation 'androidx.work:work-runtime-ktx:2.7.1'
implementation 'io.jsonwebtoken:jjwt:0.9.1'

// JSON and text manipulation
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'me.xdrop:fuzzywuzzy:1.3.1'

// Navigation and Material
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
implementation 'com.google.android.material:material:1.7.0'
implementation 'com.github.Dimezis:BlurView:version-1.6.6'
implementation 'androidx.core:core-splashscreen:1.0.0'

// Bitmap processing dependencies (for Glide)
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

// Purchase monitoring and promotions
implementation 'com.revenuecat.purchases:purchases:5.6.3'
implementation 'com.appsflyer:af-android-sdk:6.5.2'
implementation 'org.threeten:threetenbp:1.3.6:no-tzdb'

CodePudding user response:

Hope it helps to disable it completely

https://developer.android.com/reference/android/webkit/WebView#disableWebView()

WebView.disableWebView()
  • Related