وب‌کیت

با API های مدرن WebView در اندروید ۵ و بالاتر کار کنید.
آخرین به‌روزرسانی انتشار پایدار کاندیدای انتشار انتشار بتا انتشار آلفا
۱۲ آگوست ۲۰۲۶ ۱.۱۷.۰ - - -

اعلام وابستگی‌ها

برای افزودن وابستگی به Webkit، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Maven گوگل را مطالعه کنید.

وابستگی‌های مربوط به مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:

شیار

dependencies {
    implementation "androidx.webkit:webkit:1.17.0"
}

کاتلین

dependencies {
    implementation("androidx.webkit:webkit:1.17.0")
}

برای اطلاعات بیشتر در مورد وابستگی‌ها، به «افزودن وابستگی‌های ساخت» مراجعه کنید.

بازخورد

بازخورد شما به بهبود Jetpack کمک می‌کند. اگر مشکلات جدیدی کشف کردید یا ایده‌هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. می‌توانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.

ایجاد یک مسئله جدید

برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.

نسخه وب‌کیت ۱.۱۷

نسخه ۱.۱۷.۰

۱۲ آگوست ۲۰۲۶

androidx.webkit:webkit:1.17.0 منتشر شد. نسخه ۱.۱۷.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱۶.۰

  • قابلیت‌های ناوبری پیشرفته ( WebViewCompat#navigate ): جایگزینی مدرن برای WebView#loadUrl معرفی می‌کند. قابلیت‌های کلیدی شامل جایگزینی ورودی‌های تاریخچه، بازگرداندن یک شیء Navigation قابل ردیابی و پایداری مداوم هدر در طول ذخیره/بازیابی وضعیت است.
  • کنترل سهمیه حافظه پنهان HTTP ( Profile#getHttpCache ): رابط‌های برنامه‌نویسی کاربردی (API) را برای بررسی و تنظیم سهمیه‌های حافظه پنهان HTTP در سطح پروفایل ارائه می‌دهد که به برنامه‌های کاربردی با محتوای استاتیک سنگین کمک می‌کند و ردپای دایرکتوری حافظه پنهان را در صورت عدم استفاده کاهش می‌دهد.
  • صف‌بندی پیش از اتصال ( Profile#enqueuePreconnect ): امکان صف‌بندی درخواست‌های پیش از اتصال را از قبل و بدون نیاز به راه‌اندازی فوری WebView فراهم می‌کند.
  • بهینه‌سازی دانلود فاویکون ( WebSettingsCompat#setDownloadFaviconsEnabled ): برنامه‌ها را قادر می‌سازد تا دریافت خودکار فاویکون را در هنگام پیمایش غیرفعال کنند تا مصرف حافظه و پهنای باند شبکه کاهش یابد.
  • مدیریت پیش‌رندر ( Profile#getMaxPrerenders / clearMaxPrerenders ): روش‌هایی را برای بازیابی و تنظیم مجدد حداکثر پیش‌رندرهای همزمان مجاز معرفی می‌کند.
  • نوسازی و پاکسازی API: SpeculativeLoadingParameters پارامترهای PrerenderParameters / PrefetchParameters جایگزین آنها شدند. Profile#setOriginMatchedHeader آزمایشی حذف شد (در نسخه ۱.۱۵.۰ با Profile#addCustomHeader جایگزین شد).
  • قاعده‌ی پیشگیرانه‌ی پیشگیرانه‌ی خرابی: یک بررسی خرابی AndroidX اضافه می‌کند که هنگام اتصال یک WebViewClient سفارشی، پیاده‌سازی‌های onRenderProcessGone از دست رفته را علامت‌گذاری می‌کند و توسعه‌دهندگان را تشویق می‌کند تا خرابی‌های رندرکننده را به طرز مناسبی مدیریت کنند.

نسخه ۱.۱۷.۰-rc01

۲۹ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-rc01 منتشر شد. نسخه 1.17.0-rc01 شامل این کامیت‌ها است.

هیچ تغییری از زمان androidx.webkit:webkit:1.17.0-alpha04 وجود ندارد

نسخه ۱.۱۷.۰-آلفا۰۴

۱۵ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha04 منتشر شد. نسخه 1.17.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • API مربوط به Profile#enqueuePreconnect برای در صف قرار دادن درخواست‌های پیش‌اتصال بدون راه‌اندازی فوری WebView اضافه شد. ( Id7e4a ، b/511156405 )
  • WebSettingsCompat#setDownloadFaviconsEnabled و WebSettingsCompat#getDownloadFaviconsEnabled اضافه شدند که به توسعه‌دهندگان اجازه می‌دهند تنظیم کنند یا دریافت کنند که آیا یک Favicon هنگام پیمایش دانلود شود یا خیر، با غیرفعال کردن دانلود Favicons، حافظه و پهنای باند کاهش می‌یابد. ( I9f87e ، b/510229667 )

نسخه ۱.۱۷.۰-آلفا۰۳

۱ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha03 منتشر شد. نسخه 1.17.0-alpha03 شامل این کامیت‌ها است.

تغییرات API

  • یک رابط برنامه‌نویسی کاربردی HttpCache اضافه شده است که از طریق Profile#getHttpCache قابل دسترسی است و امکان پرس‌وجو و مدیریت سهمیه حافظه پنهان HTTP برای یک پروفایل را فراهم می‌کند. این می‌تواند به عملکرد و در دسترس بودن برنامه‌هایی که به شدت به محتوای استاتیک وب سرویس متکی هستند، کمک کند یا در صورت عدم نیاز به ذخیره‌سازی HTTP، استفاده از دایرکتوری حافظه پنهان را کاهش دهد. این ویژگی به نسخه M151 یا بالاتر WebView نیاز دارد. ( I40a7f ، b/501449506 )
  • حاشیه‌نویسی‌های نادرست @RequiresFeature در ScriptHandler و UserAgentMetadata#getFormFactors حذف شدند. ( Ib9550 )

بررسی پرز

  • یک هشدار lint برای فراخوانی onRenderProcessGone مدیریت نشده معرفی شد. این فراخوانی به توسعه‌دهندگان فرصتی می‌دهد تا به جای از کار افتادن برنامه‌شان، به راحتی از خاموش شدن فرآیند رندر بهبود یابند. اگر از WebViewClient استفاده شده باشد اما این فراخوانی را لغو نکرده باشد، یک هشدار lint نمایش داده می‌شود. ( Ia4e41 )

نسخه ۱.۱۷.۰-آلفا۰۲

۱۷ ژوئن ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha02 منتشر شد. نسخه 1.17.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • API های جدید اضافه شده است: getDownloadFaviconsEnabled و setDownloadFaviconsEnabled . این API ها به شما امکان می دهند کنترل کنید که آیا Favicons به طور خودکار دانلود شوند یا خیر. ( If9224 , b/510229667 )

تغییرات API

  • به‌روزرسانی API prefetchUrlAsync که PrefetchResult به عنوان یک نوع فراخوانی می‌پذیرد تا در صورت وجود درخواست prefetch تکراری، به کاربران گزارش دهد. ( Icc796 ، b/483041824 )
  • ExpectedNoVarySearchData منسوخ شده و به ExpectedNoVarySearchHint به‌روزرسانی شده است. ignoredQueryParameters و consideredQueryParameters به ​​لیست‌های تغییرناپذیر تبدیل شده‌اند. ( I7bb8c ، b/491718321 )

رفع اشکالات

  • حاشیه‌نویسی‌های RequiresFeature در ProcessGlobalConfig اصلاح شد تا به جای ارجاع به isConfigFeatureSupported نادرست، به isStartupFeatureSupported ارجاع داده شود ( I6370b ).

نسخه ۱.۱۷.۰-آلفا۰۱

۱۹ مه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha01 منتشر شد. نسخه 1.17.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • WebViewCompat#navigate ، نسخه‌ی بهبودیافته‌ی WebView#loadUrl اضافه شد. مانند loadUrl ، این متد آدرس اینترنتی مشخص‌شده را در WebView بارگذاری می‌کند، اما قابلیت‌های اضافی زیر را ارائه می‌دهد:
    • امکان جایگزینی صفحه فعلی در تاریخچه پیمایش را فراهم می‌کند.
    • یک شیء Navigation برمی‌گرداند که به توسعه‌دهنده اجازه می‌دهد تا فراخوانی navigation و فراخوانی‌های navigation را با هم تطبیق دهد.
    • هدرهای اضافی را به شیوه‌ای سازگارتر و قابل فهم‌تر مدیریت می‌کند، از جمله ذخیره و بازیابی آنها هنگام استفاده از وضعیت ذخیره. ( Iedefd ، b/408128748 )
  • SpeculativeLoadingParameters منسوخ شده‌اند. برنامه‌ها باید برای کنترل ویژگی‌های بارگذاری حدسی به PrerenderParameters یا PrefetchParameters خاص‌تر مهاجرت کنند. (منسوخ شده)
  • متدهای جدیدی به Profile برای مدیریت رفتار پیش‌رندر اضافه شد: Profile#getMaxPrerenders() برای دریافت محدودیت فعلی و Profile#clearMaxPrerenders() برای تنظیم مجدد آن به حالت پیش‌فرض. ( I696ed )
  • API آزمایشی Profile#setOriginMatchedHeader و متدهای مرتبط با آن حذف شد. APIها با Profile#addCustomHeader که به عنوان یک API پایدار در 1.15.0 منتشر شد، جایگزین شده‌اند. ( Ia7f5c , b/485235632 )

نسخه وب‌کیت ۱.۱۶

نسخه ۱.۱۶.۰

۶ مه ۲۰۲۶

androidx.webkit:webkit:1.16.0 منتشر شد. نسخه ۱.۱۶.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان انتشار ۱.۱۵.۰:

نسخه پایدار ۱.۱۶.۰ چندین API را از حالت آزمایشی خارج می‌کند و به طور قابل توجهی پایداری و تجربه توسعه‌دهندگان را برای ویژگی‌هایی مانند راه‌اندازی async WebView و گوش دادن به ناوبری بهبود می‌بخشد.
حداقل SDK پشتیبانی‌شده (minSdk) برای این کتابخانه به ۲۴ افزایش یافته است.

  • API مربوط startUpWebView و APIهای پیکربندی راه‌اندازی غیرهمزمان مرتبط در ProcessGlobalConfig و WebViewStartUpConfig از حالت آزمایشی به حالت پایدار ارتقا یافته‌اند. این APIها به برنامه‌ها اجازه می‌دهند تا راه‌اندازی WebView را زودتر آغاز کنند و تضمین می‌کنند که بخش‌هایی از راه‌اندازی در پس‌زمینه اجرا شوند تا پاسخگویی بهبود یابد. نسخه قبلی startUpWebView منسوخ شده است و کاربران باید به نسخه جدید مهاجرت کنند که برای تسهیل فراخوانی‌های ناموفق، از WebViewOutcomeReceiver استفاده می‌کند.
  • APIهای ناوبری، شامل WebViewCompat\#addNavigationListener ، NavigationListener ، Navigation و Page به نسخه پایدار ارتقا یافته‌اند. این APIها به توسعه‌دهندگان برنامه اجازه می‌دهند تا در مراحل مختلف ناوبری صفحه، از طریق رابط NavigationListener ، از WebView فراخوانی‌های برگشتی دریافت کنند. این همچنین شامل گزینه‌ای برای دریافت معیارهای عملکرد از صفحه است که اندازه‌گیری عملکرد صفحات شخص ثالث در برنامه‌هایشان را برای توسعه‌دهندگان برنامه آسان‌تر می‌کند. اشیاء Navigation و Page به عنوان شناسه‌های منحصر به فردی عمل می‌کنند که به عنوان پیوند بین فراخوانی‌های مختلف عمل می‌کنند، زمانی که چندین WebView یا ناوبری ممکن است به طور همزمان اتفاق بیفتند. شیء Navigation همچنین اطلاعات بیشتری در مورد ماهیت خاص ناوبری در حال انجام، از جمله نحوه شروع آن و اینکه آیا موفق بوده یا منجر به صفحه خطا شده است، ارائه می‌دهد، در حالی که شیء Page آدرس اینترنتی (URL) خاص را ارائه می‌دهد.
  • WebViewCompat\#saveState متد WebView\#saveState را با کنترل‌های بیشتری توسعه می‌دهد که به توسعه‌دهندگان اجازه می‌دهد حداکثر اندازه برای حالت و اینکه آیا ورودی‌های تاریخچه‌ی رو به جلو باید شامل شوند یا خیر را مشخص کنند. شیء حالت ذخیره شده همچنان با WebView\#restoreState سازگار است.
  • این نسخه از کتابخانه، WebViewOutcomeReceiver به عنوان یک پیاده‌سازی مختص کتابخانه از android.os.OutcomeReceiver معرفی می‌کند که به این کتابخانه اجازه می‌دهد مکانیزم مشابهی را برای مدیریت ناهمزمان نتایج فراخوانی بدون نیاز به وابستگی به مقادیر بالاتر targetSdk ارائه دهد. این کلاس در حالت آزمایشی androidx.webkit.OutcomeReceiverCompat نامگذاری شده بود، اما برای جلوگیری از هرگونه تداخل نام، تغییر نام داده شده است.
  • مشارکت خارجی: APIهای جدیدی برای تزریق JavaScript پایدار به عنوان بخشی از رویداد بارگذاری سند ( WebViewCompat#addJavaScriptOnEvent )، تزریق JavaScript و WebMessageListeners به ​​جهان‌های ایزوله برای جلوگیری از تداخل با JavaScript صفحه موجود، و اجرای JavaScript به عنوان پاسخ به یک پیام وب ( JavaScriptReplyProxy#executeJavaScript ) معرفی شدند.

    APIهای آزمایشی از نسخه ۱.۱۵.۰ اضافه شده‌اند

  • API مربوط به WebViewBuilder.applyTo برای اعمال پیکربندی‌های سازنده به WebViews از پیش ساخته شده اضافه شده است. این به شما امکان می‌دهد از قابلیت‌های پیکربندی API مربوط به WebViewBuilder استفاده کنید و تضمین می‌کند که تنظیمات با اشیاء WebView از پیش موجود تغییر نخواهند کرد. این API برای استفاده با نمونه‌های WebView ایجاد شده از layout inflation یا با زیرکلاس‌های WebView در نظر گرفته شده است.

APIهای آزمایشی از نسخه ۱.۱۵.۰ به‌روزرسانی شده‌اند

  • شیء BackForwardCacheSettings از یک شیء پیکربندی که از طریق WebSettingsCompat ارائه می‌شود، به یک شیء زنده که می‌توان با فراخوانی WebSettingsCompat#getBackForwardCacheSettings به آن دست یافت، تغییر یافته است. این شیء اکنون دارای متدهای تنظیم‌کننده‌ای است که تنظیمات را مستقیماً به‌روزرسانی می‌کنند. کلاس تودرتوی Builder قبلی و همچنین WebSettingsCompat#setBackForwardCacheSettings. برنامه‌هایی که قبلاً از این متدها استفاده می‌کردند، هنگام ارتقا با خطاهای ساخت مواجه خواهند شد.
  • Profile#setSpeculativeLoadingConfig منسوخ شده است. به جای آن از Profile#setMaxPrerenders ، PrefetchCache#setMaxPrefetches و PrefetchCache#setPrefetchTtlSeconds استفاده کنید.
  • Profile#clearPrefetchAsync به دلیل عدم امکان استفاده، حذف شد.
  • نوع بازگشتی StartUpLocation.getStackInformation() از String به Throwable تغییر داده شده است تا برنامه‌ها بتوانند اطلاعات را بهتر پردازش کنند.

نسخه ۱.۱۶.۰-rc01

۲۲ آوریل ۲۰۲۶

androidx.webkit:webkit:1.16.0-rc01 منتشر شد. نسخه 1.16.0-rc01 شامل این کامیت‌ها است.

  • از زمان androidx.webkit:webkit:1.16.0-beta01 هیچ تغییری ایجاد نشده است.

نسخه ۱.۱۶.۰-بتا۰۱

۸ آوریل ۲۰۲۶

androidx.webkit:webkit:1.16.0-beta01 منتشر شد. نسخه 1.16.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • آرگومان CallbackExecutor برای Profile.prefetchUrlAsync اکنون قابل تهی شدن است و در صورت عدم ارائه، به طور پیش‌فرض به نخ اصلی می‌رود. ( Ib89ef ، b/483041824 )

نسخه ۱.۱۶.۰-آلفا۰۴

۲۵ مارس ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha04 منتشر شد. نسخه 1.16.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • API startUpWebView و APIهای پیکربندی راه‌اندازی ناهمگام مرتبط در ProcessGlobalConfig و WebViewStartUpConfig از حالت آزمایشی به حالت پایدار ارتقا یافته‌اند.
    راه‌اندازی WebView می‌تواند یک فرآیند زمان‌بر باشد، بنابراین این APIها به برنامه‌ها اجازه می‌دهند تا راه‌اندازی WebView را در زمان مناسب آغاز کنند و اطمینان حاصل کنند که بخش‌هایی از راه‌اندازی WebView که قادر به اجرا در پس‌زمینه هستند، این کار را انجام می‌دهند و پاسخگویی اولین استفاده از WebView را بهبود می‌بخشند.
    این APIها قبلاً به صورت آزمایشی منتشر شده بودند و اکنون می‌توانند بدون حاشیه‌نویسی @OptIn مورد استفاده قرار گیرند. نسخه قبلی startUpWebView منسوخ شده است و کاربران آن API باید به نسخه جدید مهاجرت کنند که برای تسهیل فراخوانی‌های ناموفق، یک WebViewOutcomeReceiver می‌گیرد. ( Iebb60 ، I56bf7 )
  • APIهای ناوبری دیگر نیازی به استفاده از حاشیه‌نویسی‌های @OptIn ندارند.
    این شامل WebViewCompat#addNavigationListener و همچنین رابط NavigationListener و کلاس‌های Navigation و Page می‌شود. توجه داشته باشید که انواع Navigation و Page اکنون به جای رابط، کلاس هستند.
    اکنون این APIها باید با استفاده از ثابت ویژگی جدید WebViewFeature#NAVIGATION_LISTENER بررسی ویژگی شوند. ( I410c8 , b/474625648 , b/448580228 , b/479792864 , b/432696062 , b/474625648 )
  • حاشیه‌نویسی آزمایشی را از WebViewCompat#saveState حذف می‌کند. این API مشابه WebView#saveState است، اما به توسعه‌دهنده اجازه می‌دهد حداکثر اندازه برای حالت و اینکه آیا ورودی‌های تاریخچه‌ی رو به جلو باید شامل شوند یا خیر را مشخص کند. ( Ie3fe1 ، b/389076708 )
  • Profile#setSpeculativeLoadingConfig منسوخ شده است. به جای آن از Profile#setMaxPrerenders ، PrefetchCache#setMaxPrefetches ، PrefetchCache#setPrefetchTtlSeconds استفاده کنید. ( I9f0f7 ، I9b977 ، b/466301565 )

نسخه ۱.۱۶.۰-آلفا۰۳

۱۱ مارس ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha03 منتشر شد. نسخه 1.16.0-alpha03 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • APIهای جدید معیارهای عملکرد وب شامل onFirstContentfulPaintMillis ، onLargestContentfulPaintMillis و onPerformanceMarkMillis به NavigationListener اضافه شدند. این APIها به توسعه‌دهندگان اجازه می‌دهند تا First/Largest Contentful Paint و معیارهای عملکرد را مستقیماً در برنامه خود ردیابی کنند، به جای اینکه از جاوا اسکریپت برای بازیابی آنها استفاده کنند. ( Idb93b ، b/432696062 )
  • اطلاعات خطا به شیء ناوبری اضافه شد، به Navigation#getWebResourceError و WebResourceError#getDebugCode. اگر بارگذاری ناوبری به دلیل خطای شبکه با شکست مواجه شود، اطلاعات خطا در مورد دلیل وقوع این اتفاق اکنون در شیء ناوبری موجود است. ( I18bdc , b/474625648 )
  • شکل API تنظیمات BackForwardCache را با یک شیء BackForwardCacheSettings جدید به‌روزرسانی کنید که می‌توان آن را با فراخوانی WebSettingsCompat#getBackForwardCacheSettings به دست آورد و می‌توان از آن برای تغییر هر تنظیم از طریق متدهای set/get استفاده کرد.
    توجه: ما WebSetingsCompat#setBackForwardCacheSettings و BackForwardCacheSettings.Builder را حذف می‌کنیم، بنابراین اگر از API حذف شده استفاده می‌کردید، این تغییر ممکن است هنگام به‌روزرسانی به این نسخه باعث خطاهای کامپایل شود. ( I377f4 )
  • یک API برای اتصال اطلاعات اشکال‌زدایی به درخواست پیش‌واکشی اضافه کنید. ( Ibb300 ، b/474559983 )

تغییرات API

  • حداقل SDK پشتیبانی‌شده (minSdk) به ۲۴ افزایش یافته است. برنامه‌هایی که نسخه‌های SDK زیر ۲۴ را هدف قرار می‌دهند، برای استفاده از این و نسخه‌های آینده کتابخانه، باید SDK هدف خود را به‌روزرسانی کنند. ( I4df32 ، b/452708695 )
  • Profile#clearPrefetchAsync آزمایشی به دلیل عدم امکان اجرا حذف شد. این قابلیت در حال توسعه بود که هرگز کار نکرد. اگر نیاز به پاک کردن حافظه پنهان دارید، لطفاً درخواست ویژگی ارسال کنید. ( I341a4 , b/483043529 )
  • androidx.webkit.OutcomeReceiverCompat را به وضعیت پایدار منتقل کنید و آن را به WebViewOutcomeReceiver تغییر نام دهید. این کپی مخصوص کتابخانه از رابط به کتابخانه webkit اجازه می‌دهد تا compileSdk = 33 حفظ کند و نام جدید از تداخل نام‌ها جلوگیری می‌کند. ( I0ebf7 ، I6ef8a ، b/487934754 )
  • نوع بازگشتی StartUpLocation.getStackInformation() از String به Throwable تغییر یافت تا برنامه‌ها بتوانند اطلاعات را بهتر پردازش کنند. ( I938d6 , b/417434566 )

مشارکت خارجی

  • معرفی API های جدید
    • تزریق جاوا اسکریپت پایدار به عنوان بخشی از رویداد بارگذاری سند. این روش مشابه WebViewCompat#addDocumentStartJavaScript موجود عمل می‌کند، اما تضمین می‌کند که DOM هنگام اجرای اسکریپت آماده باشد. API جدید WebViewCompat#addJavaScriptOnEvent است.
    • جاوا اسکریپت و WebMessageListener را به دنیای ایزوله تزریق کنید تا از تداخل با جاوا اسکریپت موجود در صفحه جلوگیری شود. API های جدید WebViewCompat#addJavaScriptOnEvent و WebViewCompat#addWebMessageListener هستند.
    • اجرای جاوا اسکریپت به عنوان پاسخ به یک پیام وب ارسال شده از صفحه‌ای در همان ترکیب frame/world که پیام را ارسال کرده است. API جدید JavaScriptReplyProxy#executeJavaScript است. ( I45d92 ، b/483103617 )

نسخه ۱.۱۶.۰-آلفا۰۲

۱۱ فوریه ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha02 منتشر شد. نسخه 1.16.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • متد Page#getUrl() را اضافه می‌کند که آدرس اینترنتی (URL) مرتبط با شیء Page ( I0a5d7 , b/465339942 ) را برمی‌گرداند.
  • برای اعمال پیکربندی‌های سازنده به WebViewهای از پیش ساخته شده ( Iae133 ، b/463288296 )، API مربوط به WebViewBuilder.applyTo را اضافه کنید.

نسخه ۱.۱۶.۰-آلفا۰۱

۱۴ ژانویه ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha01 منتشر شد. نسخه 1.16.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • APIهای جدید معیارهای عملکرد وب شامل onFirstContentfulPaintMillis ، onLargestContentfulPaintMillis و onPerformanceMarkMillis به NavigationListener اضافه شدند. این APIها به توسعه‌دهندگان اجازه می‌دهند تا FCP/LCP و معیارهای عملکرد را مستقیماً در برنامه خود ردیابی کنند، به جای اینکه از جاوا اسکریپت برای بازیابی آنها استفاده کنند. ( I50266 ، b/432696062 )
  • NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS را به WebViewFeature اضافه می‌کند، که می‌تواند برای تعیین اینکه آیا Navigation#getPage در پیمایش‌های با سند یکسان، null را برمی‌گرداند یا خیر، استفاده شود. ( I3a2aa )

رفع اشکالات

  • تصحیح تهی‌پذیری پارامترهای رشته‌ای در getProfilesToLoadDuringStartup ( Ic2ce5 )
  • ثابت بررسی ویژگی WebViewBuilder که وجود ندارد را افشا کنید ( I95534 )

نسخه ۱.۱۵

نسخه ۱.۱۵.۰

۱۷ دسامبر ۲۰۲۵

androidx.webkit:webkit:1.15.0 منتشر شد. نسخه ۱.۱۵.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱۴.۰

این نسخه minSdk از API 21 به API 23 افزایش می‌دهد. همچنین قابلیت‌های جدید API زیر را معرفی می‌کند:

  • به عنوان بخشی از فراخوانی‌های shouldInterceptRequest برای WebView و Service Workers به ​​کوکی‌ها دسترسی پیدا کرده و آنها را تنظیم کنید. توسعه‌دهندگان برنامه که در حال حاضر به عنوان بخشی از shouldInterceptRequest خود به API CookieManager دسترسی دارند، اکنون می‌توانند هدرهای کوکی را مستقیماً با فراخوانی WebViewCompat#setCookiesIncludedInShouldInterceptRequest فعال کنند. این کار باعث می‌شود WebView یک هدر Cookie به نقشه WebResourceRequest.getRequestHeaders() اضافه کند که دقیقاً همان کوکی‌هایی است که برای درخواست اعمال می‌شوند. این کار همچنین به درستی هرگونه کوکی پارتیشن‌بندی شده را مدیریت می‌کند. برنامه‌ها می‌توانند مقادیر هدر Set-Cookie را از طریق API جدید WebResourceResponseCompat#setCookies ارائه دهند. مقادیر Set-Cookie اضافه شده در آنجا توسط WebView به عنوان بخشی از مدیریت پاسخ پردازش می‌شوند.
  • تنظیم هدرهای درخواست سفارشی. API مربوط به Profile#addCustomHeader به توسعه‌دهندگان برنامه اجازه می‌دهد تا فهرستی از جفت‌های نام-مقدار هدر استاتیک تنظیم کنند که به هر درخواستی که با الگوی مبدا مشخص‌شده مطابقت داشته باشد، ارسال می‌شوند.
  • امکان سفارشی‌سازی آیتم‌ها در منوی زمینه‌ی هایپرلینک WebView. با فراخوانی WebViewCompat#setHyperlinkContextMenuItems ، توسعه‌دهندگان برنامه می‌توانند مشخص کنند که وقتی کاربر یک هایپرلینک را برای مدت طولانی فشار می‌دهد، کدام آیتم‌ها در منوی زمینه ظاهر شوند.
  • فعال‌سازی پیش‌رندر . WebViewCompat#prerenderUrlAsync به برنامه‌ها اجازه می‌دهد تا URLها را قبل از نمایش در WebView ، به صورت حدسی پیش‌رندر کنند. پیش‌رندر می‌تواند با واکشی صفحه قبل از زمان، عملکرد بارگیری را به طرز چشمگیری بهبود بخشد. هنگامی که کاربر به URL می‌رود، صفحه پیش‌رندر شده فوراً نمایش داده می‌شود.
  • با فراخوانی API مربوط به WebSettingsCompat#setBackForwardCacheSettings ، می‌توانید جزئیات BackForwardCache را در WebView کنترل کنید. این API به شما امکان می‌دهد تایم‌اوت را بر حسب ثانیه تنظیم کنید یا محدودیت‌های حافظه پنهان صفحه را تنظیم کنید.
  • در نهایت، حذف هدر X-Requested-With در WebView لغو شده است و این هدر دوباره برای همه درخواست‌ها ارسال خواهد شد. بنابراین API مربوط به allowlist دیگر ضروری نیست و منسوخ شده است.

APIهای آزمایشی از نسخه ۱.۱۴.۰ اضافه شده‌اند

  • کتابخانه WebView همچنین تعدادی API معرفی کرده است که در حال حاضر وضعیت آزمایشی دارند. می‌توانید اطلاعات بیشتر در مورد این APIها را در خلاصه بسته بخوانید. اگر در مورد این APIها بازخوردی دارید، لطفاً آن را با ارسال ایمیل به android-webview-dev@chromium.org یا با ارسال بازخورد در ردیاب مشکلات ما به اشتراک بگذارید.

ویژگی‌های زیر آزمایشی هستند:

  • ProcessGlobalConfig#setUiThreadStartupMode به شما امکان می‌دهد مقداردهی اولیه نخ رابط کاربری WebView را پیکربندی کنید. به طور خاص، این به شما امکان می‌دهد انتخاب کنید که آیا راه‌اندازی باید به عنوان یک وظیفه واحد اجرا شود یا باید به وظایف کوچک‌تری تقسیم شود که کنترل را به Looper نخ رابط کاربری واگذار می‌کند.
  • نمونه‌های WebView را با پیکربندی محدود ایجاد کنید که بعداً با API WebViewBuilder قابل تغییر نباشد. در ابتدا، این بدان معناست که اکنون می‌توان اشیاء رابط جاوا اسکریپت را که فقط در یک لیست مشخص از مبداها تزریق می‌شوند، اضافه کرد که امنیت استفاده از آن را تا حد زیادی بهبود می‌بخشد. این امر همچنین هرگونه فراخوانی بیشتر برای addJavascriptInterface را در نمونه ساخته شده WebView غیرفعال می‌کند، که پیکربندی تغییرناپذیر را تضمین می‌کند.
  • توسعه‌یافته بر اساس API مربوط به WebViewCompat#startUpWebView :
  • با فراخوانی Profile#warmUpRendererProcess ، فرآیند رندرینگ را برای یک پروفایل آماده کنید. این API می‌تواند توسط برنامه‌هایی با چرخه عمر پیچیده WebView مورد استفاده قرار گیرد تا اطمینان حاصل شود که فرآیند رندرینگ در حال اجرا است، حتی اگر تمام نمونه‌های WebView از بین رفته باشند.
  • Profile#addQuicHints به برنامه‌ها اجازه می‌دهد تا به WebView بگویند هنگام اتصال به مبداهای ارائه شده، QUIC / HTTP3 را ترجیح دهد.
  • Profile#preconnect به برنامه‌ها اجازه می‌دهد تا قبل از پیمایش به یک مبدا، اتصالی را به آن باز کنند تا سرعت بارگذاری‌های بعدی افزایش یابد.

APIهای آزمایشی از نسخه ۱.۱۴.۰ به‌روزرسانی شده‌اند

نسخه ۱.۱۵.۰-rc01

۳ دسامبر ۲۰۲۵

androidx.webkit:webkit:1.15.0-rc01 منتشر شد. نسخه 1.15.0-rc01 شامل این کامیت‌ها است.

  • از زمان androidx.webkit:webkit:1.15.0-beta01 هیچ به‌روزرسانی وجود ندارد

نسخه ۱.۱۵.۰-بتا۰۱

۱۹ نوامبر ۲۰۲۵

androidx.webkit:webkit:1.15.0-beta01 منتشر شد. نسخه 1.15.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • API های آزمایشی WebViewBuilder ( I06828 ، b/409740828 ) را اضافه کنید
  • اضافه کردن UiThreadStartupMode برای راه‌اندازی غیرهمزمان که فراخوانی isMultiProcessEnabled() را از زمان راه‌اندازی Chromium متوقف می‌کند ( I524ee ، b/397372092 )
  • پنهان کردن فرم فکتور UserAgent تا زمان انتشار نسخه ۱.۱۶ ( Ibac8a ، b/430554841 ، b/454438418 )
  • به‌روزرسانی API ناوبری برای امکان ارائه نمونه‌های NavigationListener به برنامه‌ها، که می‌توانند به صورت اختیاری با یک Executor سفارشی برای فراخوانی‌های نخ پس‌زمینه پیکربندی شوند. اکنون می‌توان چندین نمونه NavigationListener به یک WebView واحد اضافه کرد.
    علاوه بر این، این به‌روزرسانی اطلاعات زمان‌بندی را به فراخوانی onFirstContentfulPaint اضافه می‌کند و اطلاعات زمانی را از شروع ناوبری تا رویداد paint ارائه می‌دهد. ( I6aa8e , b/448580228 )
  • Profile#addQuicHints اضافه می‌کند که به برنامه‌ها اجازه می‌دهد به WebView بگویند هنگام اتصال به مبداهای ارائه شده، QUIC / HTTP3 را ترجیح دهد. ( I8e364 ، b/445339041 )
  • ثابت‌های ویژگی با حاشیه‌نویسی‌های آزمایشی به‌روزرسانی شدند، و README کتابخانه با اطلاعات بیشتر در مورد APIهای آزمایشی به‌روزرسانی شد. ( I1b914 )

رفع اشکالات

نسخه ۱.۱۵.۰-آلفا۰۳

۸ اکتبر ۲۰۲۵

androidx.webkit:webkit:1.15.0-alpha03 منتشر شد. نسخه 1.15.0-alpha03 شامل این کامیت‌ها است.

تغییرات API

  • یک API جدید برای تنظیم هدرهای درخواست سفارشی معرفی می‌کند. این یک تکرار بر روی API آزمایشی قبلی است و اکنون به برنامه اجازه می‌دهد تا برای هر هدر چندین مقدار تنظیم کند، که هر کدام به مجموعه متفاوتی از الگوهای مبدا نگاشت شده‌اند. API جدید همچنین به برنامه اجازه می‌دهد تا هدرهای پیکربندی شده را بررسی کند. ( Id7d30 ، b/419469873 ، b/429269470 )
  • حذف هدر X-Requested-With در WebView لغو شده است و این هدر دوباره به طور پیش‌فرض برای همه درخواست‌ها ارسال خواهد شد. API مربوط به allowlist دیگر ضروری نیست و منسوخ شده است. ( I884c3 , b/447094379 )
  • یک API جدید به WebSettingsCompat اضافه کنید تا توسعه‌دهندگان بتوانند حافظه پنهان (cache) برگشتی WebView را پیکربندی کنند، مانند تنظیم زمان انقضا بر حسب ثانیه یا محدودیت‌های حافظه پنهان صفحه. ( I642b2 ، b/432395269 )
  • API HyperlinkContextMenu را اضافه کنید تا امکان سفارشی‌سازی آیتم در منوی زمینه Hyperlink WebView ( Idb809 ، b/382654667 ) فراهم شود.
  • برای اشکال‌زدایی مواردی که WebView به صورت غیرهمزمان و بدون استفاده از startUpWebView API راه‌اندازی شده است، API getAsyncStartUpLocations اضافه کنید. ( I6bf4b ، b/417434566 )

نسخه ۱.۱۵.۰-آلفا۰۲

۲۷ آگوست ۲۰۲۵

androidx.webkit:webkit:1.15.0-alpha02 منتشر شد. نسخه 1.15.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • Profile#preconnect اضافه شد که به برنامه‌ها اجازه می‌دهد قبل از پیمایش به یک مبدا، اتصالی را به آن باز کنند تا سرعت بارگذاری‌های بعدی افزایش یابد. ( I8db41 )
  • یک رابط برنامه‌نویسی کاربردی جدید prerenderUrlAsync به WebViewCompat اضافه شده است که به برنامه‌ها اجازه می‌دهد URLها را قبل از نمایش در WebView، به صورت حدسی پیش‌رندر کنند.
    پیش‌رندرینگ می‌تواند با دریافت صفحه از قبل، عملکرد بارگذاری را به طرز چشمگیری بهبود بخشد. وقتی کاربر به URL می‌رود، صفحه از پیش رندر شده فوراً نمایش داده می‌شود.
    این APIها قبلاً به صورت آزمایشی منتشر شده بودند و اکنون می‌توانند بدون حاشیه‌نویسی @OptIn مورد استفاده قرار گیرند. ( Ie14f5 )
  • اکنون می‌توانید مجموعه‌ای از پروفایل‌ها را برای بارگذاری همزمان هنگام فراخوانی startUpWebView API مشخص کنید. این کار با ارسال نام پروفایل‌ها به یک متد جدید در WebViewStartUpConfig.Builder ( I9a6e6 ) پیکربندی شده است.
  • یک API جدید به WebSettingsCompat اضافه کنید تا BackForwardCache را در شیء WebSettings فعال/غیرفعال کنید. این API قبلاً به صورت آزمایشی منتشر شده بود و اکنون می‌توان بدون حاشیه‌نویسی @OptIn از آن استفاده کرد. ( Ie413b )
  • پشتیبانی برای لغو فاکتورهای فرم User-Agent اضافه شد. کلاس UserAgentMetadata متدهای جدیدی برای دریافت و تنظیم فاکتورهای فرم فراداده user-agent دارد. UserAgentMetadata.Builder متد جدید setFormFactors() را برای لغو راهنمایی کلاینت Sec-CH-UA-Form-Factors User-Agent دارد. مقادیر لغو شده فعلی را می‌توان از طریق متد جدید getFormFactors() بازیابی کرد. ( I6d08c , b/430554841 )

تغییرات API

  • برای پیکربندی مقداردهی اولیه نخ رابط کاربری WebView API را به ProcessGlobalConfig اضافه کنید ( I5e85a ، b/433273850 ، b/397372092 )
  • یک نام ویژگی جدید برای WebViewStartupConfig.Builder#setProfilesToLoadDuringStartup API اضافه کنید ( I36451 )
  • انتقال minSdk پیش‌فرض از API 21 به API 23 ( Ibdfca ، b/380448311 ، b/435705964 ، b/435705223 )
  • به‌روزرسانی API مربوط به هدر منطبق با مبدا برای امکان بازنویسی مقادیر هدر با فراخوانی چندین بار setOriginMatchedHeader برای نام هدر یکسان. همچنین یک متد جدید hasOriginMatchedHeader اضافه شده است تا بررسی کند که آیا نام هدر از قبل استفاده شده است یا خیر.
    این تغییر همچنین API را به عنوان آزمایشی مشخص می‌کند، زیرا در حال حاضر فقط از تنظیم یک مقدار و نگاشت مبدا برای هر مقدار هدر پشتیبانی می‌کند و احتمالاً در آینده تغییراتی در آن ایجاد خواهد شد تا از مقادیر چندگانه نگاشت شده به مبداهای مختلف پشتیبانی کند. ( I03365 , b/419469873 , b/429269470 )
  • الزام نخ رابط کاربری برای Profile#prefetchUrlAsync() حذف شده است. اکنون می‌توان آن را از هر نخی فراخوانی کرد. ( I83d57 )
  • رابط OutcomeReceiverCompat به نفع نسخه رسمی androidx.core.os.OutcomeReceiverCompat حذف شده است. این کتابخانه اکنون به compileSdk 35 یا بالاتر نیاز دارد. ( Ie1ea5 )
  • تغییر نام [is/set]IncludeCookiesOnShouldInterceptRequestEnabled به [are/set]CookiesIncludedInShouldInterceptRequest در WebSettingsCompat ( Ife9e9 ، b/428924452 )
  • اضافه کردن حاشیه‌نویسی‌های آزمایشی API به Profile.ExperimentalUrlPrefetch که قبلاً حذف شده بودند. ( Ic54eb ، b/417458061 )

نسخه ۱.۱۵.۰-آلفا۰۱

۲ ژوئیه ۲۰۲۵

androidx.webkit:webkit:1.15.0-alpha01 منتشر شد. نسخه 1.15.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • یک API جدید برای تنظیم جفت‌های نام-مقدار هدر HTTP در درخواست‌ها به مبداهای خاص.
    متد Profile.setOriginMatchedHeader به برنامه اجازه می‌دهد تا مشخص کند که نام و مقدار هدر باید در تمام درخواست‌های HTTP/HTTPS به مبداهایی که با لیست مجاز ارائه شده مطابقت دارند، هنگام ارسال از WebViews و service workerهایی که از Profile داده شده استفاده می‌کنند، تنظیم شود. API فقط یک نگاشت واحد برای هر نام هدر را مجاز می‌داند و اگر نام هدر از قبل تنظیم شده باشد، یک استثنا ایجاد می‌کند.
    برای حذف نگاشت موجود از Profile.clearOriginMatchedHeader و برای حذف تمام نگاشت‌ها Profile.clearAllOriginMatchedHeaders استفاده کنید. ( Ida7f1 , b/419469873 )
  • یک API جدید برای دسترسی و تنظیم کوکی‌ها به عنوان بخشی از فراخوانی‌های shouldInterceptRequest برای WebView و Service Workerها.
    توسعه‌دهندگان برنامه که در حال حاضر به عنوان بخشی از shouldInterceptRequest خود به API CookieManager دسترسی دارند، اکنون می‌توانند با فراخوانی setIncludeCookiesOnShouldInterceptRequest ، هدرهای کوکی را مستقیماً فعال کنند. این کار باعث می‌شود WebView یک هدر Cookie به نقشه WebResourceRequest.getRequestHeaders() اضافه کند که دقیقاً همان کوکی‌هایی است که به درخواست اعمال می‌شوند. این کار همچنین به درستی هرگونه کوکی پارتیشن‌بندی شده را مدیریت می‌کند.
    برنامه‌ها می‌توانند مقادیر هدر Set-Cookie را از طریق API جدید WebResourceResponseCompat.setCookies ارائه دهند. مقادیر Set-Cookie اضافه شده در آنجا توسط WebView به عنوان بخشی از مدیریت پاسخ پردازش می‌شوند. ( Idbfd1 ، b/414769380 )
  • یک API آزمایشی جدید برای آماده‌سازی فرآیند رندر برای یک Profile .
    این API می‌تواند توسط برنامه‌هایی با چرخه عمر پیچیده WebView مورد استفاده قرار گیرد تا اطمینان حاصل شود که فرآیند رندرکننده در حال اجرا است، حتی اگر تمام نمونه‌های WebView از بین رفته باشند. ( Ia8fc8 )

تغییرات API

  • یک متد جدید به رابط آزمایشی ناوبری اضافه کنید تا URL ناوبری را ارائه دهد. ( I1c6c0 )
  • نام ویژگی Prefetch پروفایل را به‌روزرسانی کنید تا مشخص شود که API Prefetch اکنون می‌تواند در یک نخ پس‌زمینه فراخوانی شود. ( I7c83a )

نسخه ۱.۱۴

نسخه ۱.۱۴.۰

۴ ژوئن ۲۰۲۵

androidx.webkit:webkit:1.14.0 منتشر شد. نسخه ۱.۱۴.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱۳.۰

  • معرفی API PaymentRequest API) برای فراخوانی برنامه‌های پرداخت بومی اندروید از طریق org.chromium.intent.action.PAY intent. PaymentRequest به طور پیش‌فرض غیرفعال است و برنامه‌های میزبان WebView می‌توانند WebSettingsCompat.setPaymentRequestEnabled(settings, true) را برای فعال کردن آن فراخوانی کنند. علاوه بر این، PaymentRequest یک تگ <queries> در AndroidManifest.xml نیاز دارد. برای اطلاعات بیشتر به مستندات مربوط به setPaymentRequestEnabled() مراجعه کنید.
  • معرفی API آزمایشی Navigation برای ردیابی و مدیریت پیشرفته ناوبری وب در WebView . این APIها اطلاعات دقیقی در مورد رویدادهای ناوبری ارائه می‌دهند. برای دریافت اطلاعات دقیق در مورد ناوبری صفحه، با فراخوانی WebViewCompat.setNavigationClient به همراه پیاده‌سازی رابط جدید WebNavigationClient شروع کنید. برای اطلاعات بیشتر در مورد چرخه حیات ناوبری، لطفاً به Life of a Navigation Presentation مراجعه کنید.

نسخه ۱.۱۴.۰-rc01

۲۰ مه ۲۰۲۵

androidx.webkit:webkit:1.14.0-rc01 منتشر شد. نسخه 1.14.0-rc01 شامل این کامیت‌ها است.

  • هیچ تغییری نسبت به 1.14.0-beta01 وجود ندارد.

نسخه ۱.۱۴.۰-بتا۰۱

۷ مه ۲۰۲۵

androidx.webkit:webkit:1.14.0-beta01 منتشر شد. نسخه 1.14.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • اضافه کردن زمینه به عنوان پارامتر به startUpWebView() API ( Ic29cd ، b/406701301 )

نسخه ۱.۱۴.۰-آلفا۰۱

۹ آوریل ۲۰۲۵

androidx.webkit:webkit:1.14.0-alpha01 منتشر شد. نسخه 1.14.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • Introducing the PaymentRequest API for invoking Android native payment apps through org.chromium.intent.action.PAY intent. PaymentRequest is disabled by default and WebView host apps can call WebSettingsCompat.setPaymentRequestEnabled(settings, true) to enable it. In addition, PaymentRequest requires a <queries> tag in AndroidManifest.xml . See documentation for setPaymentRequestEnabled() for more information. ( I3304e , b/404920055 )
  • Introducing Experimental Navigation Callbacks. This release introduces experimental APIs for enhanced web navigation tracking and management within WebView . These APIs provide detailed information about navigation events. Key Features:
    • WebNavigationClient Interface: Introduces a new interface, WebNavigationClient , with callbacks for navigation events:
    • onNavigationStarted(Navigation navigation) : Notifies when a navigation begins.
    • onNavigationRedirected(Navigation navigation) : Notifies when a navigation is redirected.
    • onNavigationCompleted(Navigation navigation) : Notifies when a navigation completes.
    • Navigation Interface: Provides detailed information about a navigation, including: URL, page initiation status, same-document status, reload status, history status, back/forward status, commit status, error page status, status code, and session restore status. The Navigation object serves as a unique identifier for each navigation, allowing developers to correlate related navigation events.
    • Page class: Introduces the Page class, which serves as a key for page-associated data. ( I351a6 )
  • Introduce a new experimental API to toggle the behaviour of caching provider objects. ( I14636 )

API Changes

  • Updated the PROFILE_URL_PREFETCH feature value in WebViewFeature . ( I606fd )
  • Adds WebViewCompat#saveState , akin to WebView#saveState , but allows restricting the size of the returned state and deciding whether or not to save forward history entries. ( Iea7d6 )
  • Add maxPrerenders config to SpeculativeLoadingConfig API ( I67245 )

Version 1.13

Version 1.13.0

۱۲ مارس ۲۰۲۵

androidx.webkit:webkit:1.13.0 is released. Version 1.13.0 contains these commits .

Important changes since 1.12.0

  • Introduce a new experimental API for Url prerendering to allow developers to speculative prerender candidate urls resulting in faster navigations. ( I0cfe7 )
  • Introducing a set of new APIs to delete browsing data stored by WebView . The new APIs in WebStorageCompat should be preferred over the existing APIs in android.webkit.WebStorage , as they will guarantee deletion of all local storage, including the network cache and cookies, as well as any installed service workers. If new storage APIs are introduced in the future, then these new methods will be updated to include them in the storage deleted. ( Iad54f , b/382273208 )
  • Add setPartitionedCookiesEnabled API. This will allow developers to enable and disable partitioned cookies in WebView . ( Ic506a , b/364904765 )
  • Add socket tagging API to WebView for accounting of WebView 's network traffic using NetworkStatsManager / TrafficStats . This feature will only be available from WebView M133. ( Ica441 , b/374932688 )
  • Add experimental WebView async startup API. ( I94b8a )
  • URL Prefetching in Profile: Introduced a new API in Profile to allow developers to trigger URL prefetching. Prefetch Clearing: Added an API to clear ongoing prefetches.( I42c5c )
  • Deprecate WebView.startSafeBrowsing . ( If5626 )

Version 1.13.0-rc01

۲۶ فوریه ۲۰۲۵

androidx.webkit:webkit:1.13.0-rc01 is released. This release contains no changes from the 1.13.0-beta01 release.

Version 1.13.0-beta01

۱۲ فوریه ۲۰۲۵

androidx.webkit:webkit:1.13.0-beta01 is released. Version 1.13.0-beta01 contains these commits .

API Changes

  • Add Async suffix to prerender API. Rename any Data to Header in NoVarySearch to reflect the new name. ( Ie91c9 )
  • Add executor parameter to the url prerendering API. Also, restricting the API to be called only from the UI thread. ( I50520 )
  • Add an API to configure cache config for the profile prefetch requests. It also applies to Prerender requests initiated from WebViews associated with this Profile. ( Iebb6e )

رفع اشکالات

  • Change behavior of URLUtilCompat.guessFileName to only use the mimeType parameter to suggest an extension for filenames derived from the URL parameter. ( I53ecd , b/382864232 )

Version 1.13.0-alpha03

January 15, 2025

androidx.webkit:webkit:1.13.0-alpha03 is released. Version 1.13.0-alpha03 contains these commits .

ویژگی‌های جدید

  • Introduce a new experimental API for Url prerendering to allow developers to speculative prerender candidate urls resulting in faster navigations. ( I0cfe7 )
  • Introducing a set of new APIs to delete browsing data stored by WebView . The new APIs in WebStorageCompat should be preferred over the existing APIs in android.webkit.WebStorage , as they will guarantee deletion of all local storage, including the network cache and cookies, as well as any installed service workers. If new storage APIs are introduced in the future, then these new methods will be updated to include them in the storage deleted. ( Iad54f , b/382273208 )
  • Add setPartitionedCookiesEnabled API. This will allow developers to enable and disable partitioned cookies in WebView . ( Ic506a , b/364904765 )

API Changes

  • Change thread requirement for Prefetch API to only be called on the UI thread. ( I866b5 )
  • Update WebAuthn methods to highlight that they must be called on the UI thread. This requirement is enforced by the implementation already, and this change only adds the relevant annotation. ( I6d6ba )

Version 1.13.0-alpha02

۱۱ دسامبر ۲۰۲۴

androidx.webkit:webkit:1.13.0-alpha02 is released. Version 1.13.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Add socket tagging API to WebView for accounting of WebView 's network traffic using NetworkStatsManager / TrafficStats . This feature will only be available from WebView M133. ( Ica441 , b/374932688 )

API Changes

  • Update Prefetch API by renaming PrefetchParameter to SpeculativeLoadingParamaters , introducing new PrefetchNetworkException , replacing PrefetchOperationCallback with OutcomeReceiverCompat and update the javadoc. ( If5072 )
  • Get diagnostic information from WebView async startup API.
  • Provide an option for apps to only trigger init that doesn't block the UI thread. ( I9bf2b )

رفع اشکالات

  • This library now uses JSpecify nullness annotations , which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). ( I0e4c5 , b/326456246 )

Version 1.13.0-alpha01

۱۳ نوامبر ۲۰۲۴

androidx.webkit:webkit:1.13.0-alpha01 is released. Version 1.13.0-alpha01 contains these commits .

ویژگی‌های جدید

  • Add experimental WebView async startup API. ( I94b8a )
  • URL Prefetching in Profile: Introduced a new API in Profile to allow developers to trigger URL prefetching. Prefetch Clearing: Added an API to clear ongoing prefetches. ( I42c5c )

API Changes

  • Deprecate WebView.startSafeBrowsing . ( If5626 )

Version 1.12

Version 1.12.1

۲ اکتبر ۲۰۲۴

androidx.webkit:webkit:1.12.1 is released. Version 1.12.1 contains these commits .

رفع اشکالات

  • Resolve the issue that prevented the 1.12.0 APIs from being available in the release.

Version 1.12.0

۱۸ سپتامبر ۲۰۲۴

androidx.webkit:webkit:1.12.0 is released. Version 1.12.0 contains these commits .

Important changes since 1.11.0

  • Add a new API to WebSettingsCompat to enable/disable BackForwardCache for this WebSettings . This API is experimental and can be changed in the future. ( aosp/3111705 )
  • Add a new API to WebSettingsCompat to control the Speculative Loading behavior for this WebSettings . Only Prerender is available for now. This API is experimental and can be changed in the future. ( I13962 )
  • Added a new API to enable Web Authentication in WebView . Developers can enable/disable WebAuthn calls in a WebView for their apps using WebSettingsCompat#setWebAuthenticationSupport . ( I8187f )

Version 1.12.0-rc01

۴ سپتامبر ۲۰۲۴

androidx.webkit:webkit:1.12.0-rc01 is released. This release contains no changes from the 1.12.0-beta01 release.

Version 1.12.0-beta01

۲۱ آگوست ۲۰۲۴

androidx.webkit:webkit:1.12.0-beta01 is released. Version 1.12.0-beta01 contains these commits .

رفع اشکالات

  • Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (eg R8 version 3.3) and for all builds when using AGP 8.1 or later (eg D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. ( Ia60e0 , b/345472586 )

Version 1.12.0-alpha02

۱۲ ژوئن ۲۰۲۴

androidx.webkit:webkit:1.12.0-alpha02 is released. Version 1.12.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Add a new API to WebSettingsCompat to enabled/disable BackForwardCache . This API is experimental and can be changed in the future. ( I64a38 )
  • Add a new API to WebSettingsCompat to control the Speculative Loading behavior for this WebSettings. Only Prerender is available for now. This API is experimental and can be changed in the future. ( I13962 )

API Changes

  • Some methods are now documented with @UiThread where appropriate. ( I6c7e0 ), ( I44541 )
  • Thread-safe methods are now documented with @AnyThread . ( I70189 )
  • Increasing minSdkVersion from 19 to 21. ( Id7a43 )

Version 1.12.0-alpha01

۱۷ آوریل ۲۰۲۴

androidx.webkit:webkit:1.12.0-alpha01 is released. Version 1.12.0-alpha01 contains these commits .

API Changes

  • Added a new API to enable Web Authentication in WebView. Developers can enable/disable WebAuthn calls in a WebView for their apps using WebSettingsCompat#setWebAuthenticationSupport . ( I8187f )

Version 1.11

Version 1.11.0

۱ مه ۲۰۲۴

androidx.webkit:webkit:1.11.0 is released. Version 1.11.0 contains these commits .

Important changes since 1.10.0

  • Allow apps to control audio playback in WebView through the new setAudioMuted and isAudioMuted APIs, which are analogous to muting a tab in Chrome.
  • Introduced URLUtilCompat , which supports parsing of Content-Disposition headers that use the filename* encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse the Content-Disposition header where a suggested file name based on URL and MIME-type is not desired.

Version 1.11.0-rc01

April 3, 2024

androidx.webkit:webkit:1.11.0-rc01 is released. This release contains no changes from the 1.11.0-beta01 release.

Version 1.11.0-beta01

March 20, 2024

androidx.webkit:webkit:1.11.0-beta01 is released without any notable changes. Version 1.11.0-beta01 contains these commits .

Version 1.11.0-alpha02

February 21, 2024

androidx.webkit:webkit:1.11.0-alpha02 is released. Version 1.11.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Add setAudioMuted and isAudioMuted methods for muting (and unmuting) WebViews . This method will allow you to prevent a WebView from playing audio. ( Ie7a33 )

API Changes

  • URLUtilCompat is made final as it should not be subclassed. ( I49ec1 )

Version 1.11.0-alpha01

۷ فوریه ۲۰۲۴

androidx.webkit:webkit:1.11.0-alpha01 is released. Version 1.11.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Add compatibility for URLUtil.guessFileName . The compatibility version in URLUtilCompat supports parsing of Content-Disposition headers that use the filename* encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse the Content-Disposition header where a suggested file name based on URL and MIME-type is not desired. ( If6ae7 , b/309927164 )

Version 1.10

Version 1.10.0

January 24, 2024

androidx.webkit:webkit:1.10.0 is released. Version 1.10.0 contains these commits.

Important changes since 1.9.0

Version 1.10.0-rc01

۱۰ ژانویه ۲۰۲۴

androidx.webkit:webkit:1.10.0-rc01 is released. This release contains no changes from the 1.10.0-beta01 release.

Version 1.10.0-beta01

۱۳ دسامبر ۲۰۲۳

androidx.webkit:webkit:1.10.0-beta01 is released. Version 1.10.0-beta01 contains these commits.

  • No functional changes from 1.10.0-alpha01 .

Version 1.10.0-alpha01

۲۹ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.10.0-alpha01 is released. Version 1.10.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Added a new API to WebSettingsCompat to control the experimental Android WebView Media Integrity API behaviour by either disabling the API entirely, or restrict sharing the application identity in the API response. This can be toggled for all origins and on a per origin basis.

Version 1.9

Version 1.9.0

۲۹ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.9.0 is released. Version 1.9.0 contains these commits.

Important changes since 1.8.0

  • Added a new multi-profile API for WebViews.
  • Added an API to inject and run Javascript before page load.
    • The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a WebView which are guaranteed to run before any page scripts are executed. The API allows the app to specify a target list of origins for the script to be enabled on, ensuring that it only runs on intended pages. Unlike WebView#evaluateJavascript , this API will allow execution of scripts in embedded Iframes when they load. Apps can use this new API in combination with WebViewCompat#addWebMessageListener to set up two-way communication with JavaScript in the page in a reliable way.
  • Added APIs to modify how Privacy Sandbox Attribution Reporting events are registered.
    • We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether attribution sources and triggers are registered as coming from the app itself or coming from the web content in the WebView. This method can also be used to disable Attribution Reporting in WebView. Additionally we added a new API WebSettingsCompat#getAttributionRegistrationBehavior to get the current behavior.
    • For more information see the Privacy Sandbox documentation .
  • Added APIs to override user-agent metadata for client hints.

Version 1.9.0-rc01

۱۵ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.9.0-rc01 is released. This release contains no changes from the 1.9.0-beta01 release.

Version 1.9.0-beta01

November 1, 2023

androidx.webkit:webkit:1.9.0-beta01 is released. Version 1.9.0-beta01 contains these commits.

API Changes

  • Address user-agent metadata API's nullability issue. We update BrandVersion class to use builder pattern, make the UserAgentMetadata class's getters and setters nullability consistent. ( Ibf195 )
  • Annotating ProfileStore , WebViewCompat#setProfile and WebViewCompat.getProfile with @UiThread . ( I499b2 )

Version 1.9.0-alpha01

۱۸ اکتبر ۲۰۲۳

androidx.webkit:webkit:1.9.0-alpha01 is released. Version 1.9.0-alpha01 contains these commits.

ویژگی‌های جدید

  • We added the multi-profile API which allows you to have separate browsing sessions between WebViews , each profile has its own data (eg cookies). You can create profiles, assign them to WebView instances, and retrieve them later for any data access. There is a singleton class ProfileStore to help you manage profiles by creation or deletion with APIs; getOrCreateProfile , getProfile , getAllProfileNames and deleteProfile . The Profile class will have different APIs to use to get associated data with this profile such as its name, GeoLocationPermissions , ServiceWorkerController , CookieManager and WebStorage . Each WebView will run with the default profile by default however, you can change that using WebViewCompat#setProfile Related to that, a WebView 's profile can be retrieved using WebViewCompat#getProfile . ( I32d22 )
  • Add APIs to modify how Attribution Reporting events are registered. We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether sources and triggers are registered as coming from the app itself or coming from the web content in the WebView . This method can also be used to disable Attribution Reporting in WebView . Additionally we added a new API WebSettingsCompat#getAttributionRegistrationBehavior to get the current behavior. For more information see the Privacy Sandbox documentation . ( I661f2 )
  • Add APIs to override user-agent metadata. We introduced a new API WebSettingsCompat#setUserAgentMetadata to override the user-agent metadata for WebView, which is used to populate the user-agent client hints, and we also added another new API WebSettingsCompat#getUserAgentMetadata to get current user-agent overrides. We encourage apps to use the new API to set the right override values instead of relying on changing user-agent. ( I74500 )
  • Add an API to inject Javascript to be run during page load. The WebViewCompat.addDocumentStartJavascript API allows apps to inject scripts into a WebView which will be run before any page scripts are executed. The API allows the app to specify a target list of origins for the script to be enabled on, ensuring that it only runs on intended pages. Unlike WebView.evaluateJavascript , this API will allow execution of scripts in embedded Iframes when they load. ( Ide063 )

نسخه ۱.۸

Version 1.8.0

۶ سپتامبر ۲۰۲۳

androidx.webkit:webkit:1.8.0 is released. Version 1.8.0 contains these commits.

Important changes since 1.7.0

Version 1.8.0-rc01

۹ آگوست ۲۰۲۳

androidx.webkit:webkit:1.8.0-rc01 is released with no changes since 1.8.0-beta01 . Version 1.8.0-rc01 contains these commits.

Version 1.8.0-beta01

۲۶ ژوئیه ۲۰۲۳

androidx.webkit:webkit:1.8.0-beta01 is released with no changes since 1.8.0-alpha01 . Version 1.8.0-beta01 contains these commits.

Version 1.8.0-alpha01

۷ ژوئن ۲۰۲۳

androidx.webkit:webkit:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.

API Changes

  • See the External Contribution section.

External Contribution

  • Add support for passing ArrayBuffer over WebMessagePortCompat#postMessage , JsReplyProxy#postMessage and WebViewCompat#postWebMessage , receiving ArrayBuffer from JavaScript over WebMessagePortCompat and WebMessageListener , and receiving transferable ArrayBuffer from JavaScript over WebMessagePortCompat . Please note that this API will only be available from WebView version 116. ( Ie7567 , b/251152171 )

Version 1.7

Version 1.7.0

۲۴ مه ۲۰۲۳

androidx.webkit:webkit:1.7.0 is released. Version 1.7.0 contains these commits.

Important changes since 1.6.0

  • We added support for Image drag in WebView . You can enable your users to drag images out of the WebView by adding the new DropDataContentProvider to your app's manifest as described in the class documentation.
  • We added the ProcessGlobalConfig#setDirectoryBasePaths(Context,File,File) API which can be used to set the base directories that WebView will use for the current process. As with all methods on ProcessGlobalConfig , this method must be called before the first instance of WebView is instantiated. This method is added to provide Android framework the capability to tweak WebView settings. For general purpose applications, using this method is not recommended.

Version 1.7.0-rc01

۱۰ مه ۲۰۲۳

androidx.webkit:webkit:1.7.0-rc01 is released with no changes since 1.7.0-beta01 . Version 1.7.0-rc01 contains these commits.

Version 1.7.0-beta01

۵ آوریل ۲۰۲۳

androidx.webkit:webkit:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.

API Changes

  • Minor change to feature flag and method name and make setDirectoryBasePaths() accept File instead of String ( Ib0d0a )

Version 1.7.0-alpha03

March 8, 2023

androidx.webkit:webkit:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • Add ProcessGlobalConfig#setDirectoryBasePath(String, String) API which can be used to set the base directories that WebView will use for the current process. ( Ibd1a1 , b/250553687 )

رفع اشکالات

  • Fix invalid ProGuard rule causing build errors when using DexGuard ( Ia65c2 , b/270034835 )

Version 1.7.0-alpha02

۸ فوریه ۲۰۲۳

androidx.webkit:webkit:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

رفع اشکالات

  • Documentation bugs for DropDataContentProvider .

Version 1.7.0-alpha01

۲۵ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

ویژگی‌های جدید

  • We are adding support for Image drag in WebView . You can enable your users to drag images out of the WebView by adding the new DropDataContentProvider to your app's manifest. ( 05a1a6 )

Version 1.6

Version 1.6.1

March 22, 2023

androidx.webkit:webkit:1.6.1 is released. Version 1.6.1 contains these commits.

رفع اشکالات

  • Fix proguard parse error ( Ia65c2 )

نسخه ۱.۶.۰

۲۵ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.6.0 is released. Version 1.6.0 contains these commits.

Important changes since 1.5.0

  • A new ProcessGlobalConfig API has been added to allow apps to provide configuration settings that need to be set before loading WebView, such as the WebView data directory suffix. The configuration should be set up and applied as early as possible during application startup, to ensure that it happens before any other thread can call a method that loads WebView into the process.
  • A new CookieManagerCompat API has been added to expand android.webkit.CookieManager with a new getCookieInfo method, which retrieves all attributes for all cookies set on a specific URL. This differs from the existing getCookie API in CookieManager which returns only the name and value attributes of the cookies.
  • WebSettingsCompat has new methods to enable/disable the effect of EnterpriseAuthenticationAppLinkPolicy if set by admin in WebView , and to get the current setting . This feature lets WebView open an Authentication app instead of opening the authentication URL. This feature has no effect on devices that are not managed by an enterprise policy.
  • Adding a new API to WebSettingsCompat to let applications explicitly send the app package name in the X-Requested-With header to allowlisted origins. The header has traditionally been sent on every request from WebView .

Version 1.6.0-rc01

۱۱ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

رفع اشکالات

  • Fixed NullPointerException in WebViewFeature.isStartupFeatureSupported(Context, String) when running on SDK < L. ( Ic7292 )

Version 1.6.0-beta01

۷ دسامبر ۲۰۲۲

androidx.webkit:webkit:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

API Changes

  • ProcessGlobalConfig has been changed to use a normal constructor and a static apply method. The apply method should only be called once per process, as early as possible, and will throw IllegalStateException if called more than once. ProcessGlobalConfig objects no longer have any restrictions on how many times setters can be called. ( I456c3 )

Version 1.6.0-alpha03

November 9, 2022

androidx.webkit:webkit:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

ویژگی‌های جدید

  • Add ProcessGlobalConfig class enabling users to set process global config before loading WebView . WebView has some process-global configuration parameters that cannot be changed once WebView has been loaded (eg the WebView data directory). This class allows apps to set these parameters. The configuration should be set up and applied as early as possible during application startup, to ensure that it happens before any other thread can call a method that loads WebView into the process. ( I7c0e0 , b/250553687 )
  • Adding new API to let applications explicitly send the app package name in the X-Requested-With header to allowlisted origins. The header has traditionally been sent on every request from WebView . ( I0adfe , b/226552535 )

API Changes

  • The WebSettingsCompat#setAlgorithmicDarkeningAllowed API is supported on all Android versions in WebView version 105 and later. Previous versions of WebView only supported the API on Android Q and later. As a result, this api is no longer marked @RequiresApi(Build.VERSION_CODES.Q) . ( I3ac1d )

Version 1.6.0-alpha02

October 24, 2022

androidx.webkit:webkit:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Adds a new CookieManagerCompat class along with a getCookieInfo API which retrieves all attributes for all cookies set on a specific URL. This differs from the existing getCookie API in CookieManager which returns only the name and value attributes of the cookies. ( I07365 , b/242161756 )

Version 1.6.0-alpha01

۲۴ آگوست ۲۰۲۲

androidx.webkit:webkit:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Added APIs in WebSettingsCompat to enable/disable the effect of EnterpriseAuthenticationAppLinkPolicy if set by admin in WebView . This feature lets WebView open an Authentication app instead of opening the authentication URL. This feature has no effect on devices that are not managed by an enterprise policy.

نسخه ۱.۵.۰

نسخه ۱.۵.۰

۲۴ آگوست ۲۰۲۲

androidx.webkit:webkit:1.5.0 is released. Version 1.5.0 contains these commits.

Important changes since 1.4.0

  • A new setAlgorithmicDarkeningAllowed API on WebSettingsCompat replaces the old setForceDark and setForceDarkStrategy APIs. Apps targeting SDK 33 and higher (T) should use the new API, as the old API will no longer have any effect for those apps.
  • An allow-list of URLs to use the configured proxy can now be set through ProxyCofig.Builder by setting setReverseBypassEnabled to true . When this is in effect, all other URLs will bypass the configured proxy.

Version 1.5.0-rc01

۱۰ آگوست ۲۰۲۲

androidx.webkit:webkit:1.5.0-rc01 is released with no changes since 1.5.0-beta01 . Version 1.5.0-rc01 contains these commits.

Version 1.5.0-beta01

۲۹ ژوئن ۲۰۲۲

androidx.webkit:webkit:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Alogrithimic Darkening related APIs are now annotated to require API level Q. The API will not have any effect on API levels < Q, since dark theme is not an option on these devices. ( I0905e )

Version 1.5.0-alpha01

۱۸ مه ۲۰۲۲

androidx.webkit:webkit:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Add a new getVariationsHeader() method on WebViewCompat to get the X-Client-Data header value sent by the WebView . The returned value will be a base64 encoded ClientVariations protobuf.
  • Add APIs on WebSettingsCompat to allow/disallow algorithmic darkening for app with targetSdk >= 33. ( I29597 )

API Changes

  • Add a new method in ProxyCofig.Builder to set reverse bypass. Setting reverse bypass to true means only URLs in the bypass list will use the proxy settings. ( I9eaa2 , b/168728599 )

رفع اشکالات

  • Fixed a typo in dark theme documentation. ( I36ebf , b/194343633 )
  • Fixed a bug where WebViewAssetLoader.Builder methods were unintentionally order-dependent. ( If420d , b/182196765 )

نسخه ۱.۴.۰

نسخه ۱.۴.۰

December 16, 2020

androidx.webkit:webkit:1.4.0 is released. Version 1.4.0 contains these commits.

Major changes since 1.3.0

  • Added a new setSafeBrowsingAllowlist() API to replace setSafeBrowsingWhitelist() . This helps apps update their code to avoid non-inclusive terminology, while still supporting the same range of Android SDKs and WebView versions as the deprecated API.
  • Fixed a bug in setProxyOverride that caused fallback rules not being correctly applied.

Version 1.4.0-rc02

December 2, 2020

androidx.webkit:webkit:1.4.0-rc02 is released. Version 1.4.0-rc02 contains these commits.

رفع اشکالات

  • Fixes fallback rules not being correctly applied when using setProxyOverride.

Version 1.4.0-rc01

November 11, 2020

androidx.webkit:webkit:1.4.0-rc01 is released with no changes since 1.4.0-beta01 . Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta01

۱۴ اکتبر ۲۰۲۰

androidx.webkit:webkit:1.4.0-beta01 is released with no changes since 1.4.0-alpha01 . Version 1.4.0-beta01 contains these commits.

Version 1.4.0-alpha01

۱۶ سپتامبر ۲۰۲۰

androidx.webkit:webkit:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.

API Changes

  • Added a new WebViewCompat#setSafeBrowsingAllowlist() API to replace setSafeBrowsingWhitelist() . This helps apps update their code to avoid non-inclusive terminology, while still supporting the same range of Android SDKs and WebView versions as the deprecated API. ( I8d65d )

نسخه ۱.۳.۰

نسخه ۱.۳.۰

۱۹ آگوست ۲۰۲۰

androidx.webkit:webkit:1.3.0 is released. Version 1.3.0 contains these commits.

Major changes since 1.2.0

  • ForceDarkStrategy API provides more control to WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener and its related APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.
  • isMultiProcessEnabled API to check whether WebView is running in multi process. This is possible starting in Android O and it means web content is rendered in a sandboxed renderer process separate to the application process. This sandboxed renderer may be shared with other WebViews in the same application but it's not shared with other application processes.

Version 1.3.0-rc02

۵ آگوست ۲۰۲۰

androidx.webkit:webkit:1.3.0-rc02 is released. Version 1.3.0-rc02 contains these commits.

رفع اشکالات

  • This fixes a compatibility issue where WebMessageListener would sometimes crash during local development if your app was started with Android Studio instant run.

Version 1.3.0-rc01

June 24, 2020

androidx.webkit:webkit:1.3.0-rc01 is released with no changes since 1.3.0-beta01 . Version 1.3.0-rc01 contains these commits.

Version 1.3.0-beta01

۱۰ ژوئن ۲۰۲۰

androidx.webkit:webkit:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

ویژگی‌های جدید

  • ForceDarkStrategy API to control WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.
  • MultiProcessEnabled API to check if WebView is running in multi process mode.

Version 1.3.0-alpha03

۲۷ مه ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.

API Changes

  • addWebMessageListener method now receives a Set<String> of allowed origin rules (previously a List<String> ).

Version 1.3.0-alpha02

۲۹ آوریل ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.

ویژگی‌های جدید

  • MultiProcessEnabled API to check if WebView is running in multi process mode.

API Changes

  • All dark strategy constants are now prefixed with DARK_STRATEGY .

Version 1.3.0-alpha01

۱۵ آوریل ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

ویژگی‌های جدید

  • ForceDarkStrategy API to control WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.

نسخه ۱.۲.۰

نسخه ۱.۲.۰

۴ مارس ۲۰۲۰

androidx.webkit:webkit:1.2.0 is released. Version 1.2.0 contains these commits.

Major changes since 1.1.0

  • Added the ForceDark API to control if WebViews should be rendered in dark mode.

Version 1.2.0-rc01

۱۹ فوریه ۲۰۲۰

androidx.webkit:webkit:1.2.0-rc01 is released with no changes since 1.2.0-beta01 . Version 1.2.0-rc01 contains these commits.

Version 1.2.0-beta01

February 5, 2020

androidx.webkit:webkit:1.2.0-beta01 is released with no changes since 1.2.0-alpha01 . Version 1.2.0-beta01 contains these commits .

Version 1.2.0-alpha01

December 18, 2019

androidx.webkit:webkit:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits .

ویژگی‌های جدید

  • ForceDark API to control if WebViews should be rendered in dark mode.

Version 1.1.0

Version 1.1.0

۷ نوامبر ۲۰۱۹

androidx.webkit:webkit:1.1.0 is released. Version 1.1.0 contains these commits .

Important changes since 1.0.0

  • Getter APIs to complement setWebViewClient() and setWebChromeClient() .
  • ProxyController API to set a network request proxy for an app's WebViews.
  • WebViewAssetLoader API to simplify loading APK assets, resources, and files from the app data directory via request interception. This allows access to web and local resources without disabling CORS.
  • TracingController API to collect WebView tracing information for debugging purposes.
  • RenderProcess APIs to manage WebView renderer services, and to detect when poorly behaved content causes WebView renderers to become unresponsive.
  • Updated existing APIs to include nullability ( @NonNull , @Nullable ) and thread ( @UiThread , @WorkerThread ) annotations.

Version 1.1.0-rc01

October 9, 2019

androidx.webkit:webkit:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits .

رفع اشکالات

  • Fixed an issue where setWebViewRenderProcessClient() could crash if passed a null client.

Version 1.1.0-beta01

۵ سپتامبر ۲۰۱۹

androidx.webkit:webkit:1.1.0-beta01 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • New InternalStoragePathHandler in WebViewAssetLoader to load files from the app's data directory.

API changes

  • ProxyConfig#getProxyRules() now returns an unmodifiable list of ProxyRule instances, which is a new class to hold a scheme filter and its corresponding proxy URL.

رفع اشکالات

  • WebViewAssetLoader defaults to a "text/plain" MIME type (rather than null) when it can't guess the MIME type from the file path.
  • WebViewAssetLoader no longer throws a NullPointerException when loading files with special characters in their path names.

Version 1.1.0-alpha02

August 7, 2019

androidx.webkit:webkit:1.1.0-alpha02 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • WebViewAssetLoader exposes the PathHandler interface to allow apps to create custom path-handling functionality.

API changes

  • WebViewAssetLoader is now a final class, since it's not meant to be subclassed.
  • WebViewAssetLoader#PathHandler implementations are now public and final.
  • Minor changes to ProxyConfig method names.
  • ProxyController : added new methods addDirect() and addDirect(String) to connect directly to servers; removed DIRECT String.
  • Updated existing APIs to include nullability ( @NonNull , @Nullable ) and thread ( @UiThread , @WorkerThread ) annotations.

Version 1.1.0-alpha01

۷ مه ۲۰۱۹

androidx.webkit:webkit:1.1.0-alpha01 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • Getter APIs to complement setWebViewClient() and setWebChromeClient()
  • ProxyController API to set a network request proxy for an app's WebViews.
  • AssetLoader API to simplify loading APK assets and resources via request interception, allowing access to web resources without disabling CORS.
  • TracingController API to collect WebView tracing information for debugging purposes.
  • RenderProcess APIs to manage WebView renderer services, and to detect when poorly behaved content causes WebView renderers to become unresponsive.

رفع اشکالات

  • Minor fixes to documentation formatting for existing APIs.
،

Webkit

Work with modern WebView APIs on Android 5 and above.
آخرین به‌روزرسانی Stable Release Release Candidate انتشار بتا Alpha Release
۱۲ آگوست ۲۰۲۶ ۱.۱۷.۰ - - -

Declaring dependencies

To add a dependency on Webkit, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

شیار

dependencies {
    implementation "androidx.webkit:webkit:1.17.0"
}

کاتلین

dependencies {
    implementation("androidx.webkit:webkit:1.17.0")
}

For more information about dependencies, see Add build dependencies .

بازخورد

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Webkit Version 1.17

Version 1.17.0

۱۲ آگوست ۲۰۲۶

androidx.webkit:webkit:1.17.0 is released. Version 1.17.0 contains these commits .

Important Changes Since 1.16.0

  • Enhanced Navigation Capabilities ( WebViewCompat#navigate ): Introduces a modern replacement for WebView#loadUrl . Key capabilities include replacing history entries, returning a trackable Navigation object, and consistent header persistence during state save/restore.
  • HTTP Cache Quota Control ( Profile#getHttpCache ): Provides APIs to inspect and adjust profile-level HTTP cache quotas, benefiting static-content-heavy applications and reducing cache directory footprint when unused.
  • Preconnection Queueing ( Profile#enqueuePreconnect ): Allows enqueuing preconnect requests in advance without forcing an immediate startup WebView.
  • Favicon Download Optimization ( WebSettingsCompat#setDownloadFaviconsEnabled ): Enables apps to disable automatic Favicon fetching on navigation to reduce memory consumption and network bandwidth.
  • Prerender Management ( Profile#getMaxPrerenders / clearMaxPrerenders ): Introduces methods to retrieve and reset maximum allowed concurrent prerenders.
  • API Modernization & Cleanups: Deprecated SpeculativeLoadingParameters in favor of PrerenderParameters / PrefetchParameters . Removed experimental Profile#setOriginMatchedHeader (superseded by Profile#addCustomHeader in 1.15.0).
  • Proactive Crash Prevention Lint Rule: Adds an AndroidX lint check that flags missing onRenderProcessGone implementations when a custom WebViewClient is attached, encouraging developers to handle renderer crashes gracefully.

Version 1.17.0-rc01

۲۹ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-rc01 is released. Version 1.17.0-rc01 contains these commits .

There are no changes since androidx.webkit:webkit:1.17.0-alpha04

Version 1.17.0-alpha04

۱۵ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha04 is released. Version 1.17.0-alpha04 contains these commits .

API Changes

  • Added Profile#enqueuePreconnect API to enqueue preconnection requests without triggering immediate WebView startup. ( Id7e4a , b/511156405 )
  • Added WebSettingsCompat#setDownloadFaviconsEnabled and WebSettingsCompat#getDownloadFaviconsEnabled which allows developers to set or get whether a Favicon will be downloaded upon a navigation, by disabling the downloading of Favicons there will be a decrease in memory and bandwidth. ( I9f87e , b/510229667 )

Version 1.17.0-alpha03

۱ ژوئیه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha03 is released. Version 1.17.0-alpha03 contains these commits .

API Changes

  • Added an HttpCache API, accessible via Profile#getHttpCache , providing the ability to query and manage the HTTP cache quota for a profile. This can benefit the performance and availability of apps which rely heavily on web-served static content, or alternatively reduce cache directory usage where HTTP caching is not needed. This feature requires WebView version M151 or higher. ( I40a7f , b/501449506 )
  • Removed incorrect @RequiresFeature annotations on ScriptHandler and UserAgentMetadata#getFormFactors . ( Ib9550 )

Lint Checks

  • Introduced a lint warning for unhandled onRenderProcessGone callback. This callback gives developers an opportunity to gracefully recover from a render process shutting down rather than crashing their app. A warning will be linted if a WebViewClient has been used but it has not overridden this callback. ( Ia4e41 )

Version 1.17.0-alpha02

۱۷ ژوئن ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha02 is released. Version 1.17.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Added new APIs: getDownloadFaviconsEnabled and setDownloadFaviconsEnabled . These APIs will allow you to control whether Favicons will be downloaded automatically. ( If9224 , b/510229667 )

API Changes

  • Update the prefetchUrlAsync API that accepts PrefetchResult as a callback type to report users if there is a duplicate prefetch request. ( Icc796 , b/483041824 )
  • ExpectedNoVarySearchData is deprecated and updated to ExpectedNoVarySearchHint . ignoredQueryParameters and consideredQueryParameters are made immutable lists. ( I7bb8c , b/491718321 )

رفع اشکالات

  • Corrected RequiresFeature annotations on ProcessGlobalConfig to reference isStartupFeatureSupported instead of the incorrect isConfigFeatureSupported . ( I6370b )

Version 1.17.0-alpha01

۱۹ مه ۲۰۲۶

androidx.webkit:webkit:1.17.0-alpha01 is released. Version 1.17.0-alpha01 contains these commits .

API Changes

  • Added WebViewCompat#navigate , an enhanced version of WebView#loadUrl . Like loadUrl , this method will load the specified url in the WebView , but offers the following additional capabilities:
    • Allows replacing the current page in the navigation history.
    • Returns a Navigation object, allowing the developer to match between the navigate call and navigation callbacks.
    • Handles extra headers in a more consistent and understandable manner, including saving and restoring them when using save state. ( Iedefd , b/408128748 )
  • Deprecated SpeculativeLoadingParameters . Apps should migrate to the more specific PrerenderParameters or PrefetchParameters for controlling speculative loading features. (I8afed)
  • Added new methods to Profile to manage prerendering behavior: Profile#getMaxPrerenders() to get the current limit and Profile#clearMaxPrerenders() to reset it to the default. ( I696ed )
  • Removed the experimental Profile#setOriginMatchedHeader and associated methods. The APIs have been superseded by Profile#addCustomHeader , which was released as a stable API in 1.15.0 . ( Ia7f5c , b/485235632 )

Webkit Version 1.16

Version 1.16.0

۶ مه ۲۰۲۶

androidx.webkit:webkit:1.16.0 is released. Version 1.16.0 contains these commits .

Important changes since 1.15.0:

The 1.16.0 stable release brings multiple APIs out of experimental status, significantly improving stability and developer experience for features like async WebView startup and navigation listening.
The minimum supported SDK (minSdk) for this library has been increased to 24.

  • The startUpWebView API and related async startup configuration APIs in ProcessGlobalConfig and WebViewStartUpConfig have been graduated from experimental to stable. These APIs let applications trigger WebView startup earlier, ensuring portions of the startup run in the background to improve responsiveness. The previous version of startUpWebView has been deprecated, and users should migrate to the new version, which takes a WebViewOutcomeReceiver to facilitate failure callbacks.
  • The navigation APIs, including WebViewCompat\#addNavigationListener , NavigationListener , Navigation , and Page have been graduated to stable. These APIs let app developers receive callbacks from WebView during the different stages of page navigation through the NavigationListener interface. This also includes the option to receive performance metrics from the page, which makes it easier for app developers to measure performance of first-party pages in their apps. The Navigation and Page objects serve as unique identifiers that serve as the link between the different callbacks when multiple WebViews or navigations might be happening concurrently. The Navigation object also provides more information about the specific nature of the ongoing navigation, including how it was started, and whether it succeeded or resulted in an error page, while the Page object provides the specific URL.
  • WebViewCompat\#saveState extends the WebView\#saveState method with more controls that allow developers to specify a maximum size for the state and whether forward history entries should be included. The saved state object is still compatible with WebView\#restoreState
  • This version of the library introduces WebViewOutcomeReceiver as a library-specific implementation of android.os.OutcomeReceiver , which allows this library to provide a similar mechanism for asynchronous callback result handling without a need to depend on higher targetSdk values. This class was named androidx.webkit.OutcomeReceiverCompat while in experimental status but has been renamed to avoid any name clashes.
  • External Contribution: New APIs were introduced to inject persistent JavaScript as part of the document loaded event ( WebViewCompat#addJavaScriptOnEvent ), inject JavaScript and WebMessageListeners into isolated worlds to prevent collisions with existing page JavaScript , and execute JavaScript as a response to a web message ( JavaScriptReplyProxy#executeJavaScript ).

    Experimental APIs added since 1.15.0

  • Added WebViewBuilder.applyTo API for applying builder configurations to pre-constructed WebViews . This lets you use the configuration capabilities of the WebViewBuilder API, and the corresponding guarantees that settings won't change, with pre-existing WebView objects. This is intended to be used with WebView instances created from layout inflation, or with subclasses of WebView .

Experimental APIs updated since 1.15.0

  • The BackForwardCacheSettings object has been changed from a configuration object that is provided through WebSettingsCompat to a live object that can be obtained by calling WebSettingsCompat#getBackForwardCacheSettings . The object now has setter methods that update the settings directly. The previous Builder nested class has been removed, as has WebSettingsCompat#setBackForwardCacheSettings. Apps that previously used these methods will experience build errors when upgrading.
  • Profile#setSpeculativeLoadingConfig is deprecated. Use Profile#setMaxPrerenders , PrefetchCache#setMaxPrefetches , and PrefetchCache#setPrefetchTtlSeconds instead.
  • Removed Profile#clearPrefetchAsync as it was a no-op.
  • Changed the return type of StartUpLocation.getStackInformation() from String to Throwable to allow apps to process the information better.

Version 1.16.0-rc01

۲۲ آوریل ۲۰۲۶

androidx.webkit:webkit:1.16.0-rc01 is released. Version 1.16.0-rc01 contains these commits .

  • There are no changes since androidx.webkit:webkit:1.16.0-beta01 .

Version 1.16.0-beta01

April 08, 2026

androidx.webkit:webkit:1.16.0-beta01 is released. Version 1.16.0-beta01 contains these commits .

API Changes

  • The CallbackExecutor argument to Profile.prefetchUrlAsync is now nullable and defaults to the main thread if not provided. ( Ib89ef , b/483041824 )

Version 1.16.0-alpha04

۲۵ مارس ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha04 is released. Version 1.16.0-alpha04 contains these commits .

API Changes

  • The startUpWebView API and related async startup configuration APIs in ProcessGlobalConfig and WebViewStartUpConfig have been graduated from experimental to stable.
    WebView startup can be a time-consuming process, so these APIs allow applications to trigger WebView startup at the right time, ensuring that portions of WebView startup which are able to run in the background will do so, improving the responsiveness of the first WebView usage.
    These APIs were previously released as experimental, and can now be used without an @OptIn annotation. The previous version of startUpWebView has been deprecated, and users of that API should migrate to the new version, which takes a WebViewOutcomeReceiver to facilitate failure callbacks. ( Iebb60 , I56bf7 )
  • Navigation APIs no longer require the use of @OptIn annotations.
    This covers WebViewCompat#addNavigationListener , as well as the NavigationListener interface, and the Navigation and Page classes. Note that the Navigation and Page types are now classes instead of interfaces.
    These APIs should now be feature checked using the new WebViewFeature#NAVIGATION_LISTENER feature constant. ( I410c8 , b/474625648 , b/448580228 , b/479792864 , b/432696062 , b/474625648 )
  • Removes the experimental annotation from WebViewCompat#saveState . This API is similar to WebView#saveState , but allows the developer to specify a maximum size for the state, and whether forward history entries should be included. ( Ie3fe1 , b/389076708 )
  • Profile#setSpeculativeLoadingConfig is deprecated. Use Profile#setMaxPrerenders , PrefetchCache#setMaxPrefetches , PrefetchCache#setPrefetchTtlSeconds instead. ( I9f0f7 , I9b977 , b/466301565 )

Version 1.16.0-alpha03

۱۱ مارس ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha03 is released. Version 1.16.0-alpha03 contains these commits .

ویژگی‌های جدید

  • Added new Web Performance Metrics APIs onFirstContentfulPaintMillis , onLargestContentfulPaintMillis and onPerformanceMarkMillis to NavigationListener . These APIs allow developers to track First/Largest Contentful Paint and performance marks directly in their app instead of using JavaScript to retrieve them. ( Idb93b , b/432696062 )
  • Added error information to the Navigation object, see Navigation#getWebResourceError and WebResourceError#getDebugCode. If a navigation load fails due to a net error, error information about why this occurred is now available on the navigation object. ( I18bdc , b/474625648 )
  • Update the API shape of BackForwardCache settings by a new BackForwardCacheSettings object that can be obtained by calling WebSettingsCompat#getBackForwardCacheSettings , and can be used to alter each setting through set/get methods.
    Note: We are removing WebSetingsCompat#setBackForwardCacheSettings and BackForwardCacheSettings.Builder , so this change may cause compilation errors when you update to this version if you were using the removed API. ( I377f4 )
  • Add an api to attch debug information to prefetch request. ( Ibb300 , b/474559983 )

API Changes

  • The minimum supported SDK (minSdk) has been increased to 24. Apps targeting SDK versions below 24 will need to update their target SDK to use this and future versions of the library. ( I4df32 , b/452708695 )
  • Removed the experimental Profile#clearPrefetchAsync since it was no-op. This was in-development functionality that never worked. If you need to clear the cache, please submit a feature request. ( I341a4 , b/483043529 )
  • Migrate androidx.webkit.OutcomeReceiverCompat to stable status, and renamed it to WebViewOutcomeReceiver . This library-specific copy of the interface allows the webkit library to maintain compileSdk = 33 , and the new name prevents name clashes. ( I0ebf7 , I6ef8a , b/487934754 )
  • Changed return type of StartUpLocation.getStackInformation() from String to Throwable to allow apps to process the information better. ( I938d6 , b/417434566 )

External Contribution

  • Introducing new APIs to
    • Inject persistent JavaScript as part of the document loaded event. This works similar to the existing WebViewCompat#addDocumentStartJavaScript , but ensures that the DOM is ready when the script runs. The new API is WebViewCompat#addJavaScriptOnEvent .
    • Inject JavaScript and WebMessageListener s into isolated worlds, to prevent collisions with existing page JavaScript. The new APIs are WebViewCompat#addJavaScriptOnEvent and WebViewCompat#addWebMessageListener .
    • Execute JavaScript as response to a web message sent from a page in the same frame/world combo that sent the message. The new API is JavaScriptReplyProxy#executeJavaScript . ( I45d92 , b/483103617 )

Version 1.16.0-alpha02

February 11, 2026

androidx.webkit:webkit:1.16.0-alpha02 is released. Version 1.16.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Adds Page#getUrl() which returns the Url associated with the Page object ( I0a5d7 , b/465339942 )
  • Add WebViewBuilder.applyTo API for applying builder configurations to pre-constructed WebViews ( Iae133 , b/463288296 )

Version 1.16.0-alpha01

۱۴ ژانویه ۲۰۲۶

androidx.webkit:webkit:1.16.0-alpha01 is released. Version 1.16.0-alpha01 contains these commits .

ویژگی‌های جدید

  • Added new Web Performance Metrics APIs onFirstContentfulPaintMillis , onLargestContentfulPaintMillis and onPerformanceMarkMillis to NavigationListener . These APIs allow developers to track FCP/LCP and performance marks directly in their app instead of using JavaScript to retrieve them. ( I50266 , b/432696062 )
  • Adds NAVIGATION_LISTENER_NON_NULL_PAGE_FOR_SAME_DOCUMENT_NAVIGATIONS to WebViewFeature , which can be used to determine whether Navigation#getPage will return null on same-document navigations. ( I3a2aa )

رفع اشکالات

  • Correct nullability of string parameters in getProfilesToLoadDuringStartup ( Ic2ce5 )
  • Expose missing WebViewBuilder feature check constant ( I95534 )

Version 1.15

Version 1.15.0

۱۷ دسامبر ۲۰۲۵

androidx.webkit:webkit:1.15.0 is released. Version 1.15.0 contains these commits .

Important changes since 1.14.0

This release increases the minSdk from API 21 to API 23. It also introduces the following new API capabilities:

  • Access and set cookies as part of shouldInterceptRequest callbacks for WebView and Service Workers. App developers who currently access the CookieManager API as part of their shouldInterceptRequest can now instead enable cookie headers directly by calling WebViewCompat#setCookiesIncludedInShouldInterceptRequest . This will then cause WebView to add a Cookie header to the WebResourceRequest.getRequestHeaders() map which will be the exact cookies that apply to the request. This will also correctly handle any partitioned cookies. Apps can provide Set-Cookie header values through the newly added WebResourceResponseCompat#setCookies API. The Set-Cookie values added there will be processed by WebView as part of the response handling.
  • Set custom request headers. The Profile#addCustomHeader API allows app developers to set a list of static header name-value pairs, which will be sent on any requests that match the specified origin pattern.
  • Allow item customization in WebView hyperlink context menu. By calling WebViewCompat#setHyperlinkContextMenuItems , app developers can specify which items appear in the context menu when a user long-presses a hyperlink.
  • Trigger prerendering . WebViewCompat#prerenderUrlAsync allows applications to speculatively prerender URLs before they are displayed in a WebView . Prerendering can dramatically improve loading performance by fetching the page ahead of time. When the user navigates to the URL, the prerendered page is displayed instantly.
  • Control the specifics of the BackForwardCache in WebView by calling the WebSettingsCompat#setBackForwardCacheSettings API. This API allows you to set the timeout in seconds or adjust the page cache limits.
  • Finally, the removal of the X-Requested-With header in WebView has been canceled, and the header will again be sent on all requests. The allowlist API is thus no longer necessary, and has been deprecated.

Experimental APIs added since 1.14.0

  • The WebView library has also introduced a number of APIs that currently have experimental status. You can read more about these APIs in the package summary . If you have any feedback on these APIs, please share it either by sending an email to android-webview-dev@chromium.org or by submitting feedback in our issue tracker .

The following features are experimental:

  • ProcessGlobalConfig#setUiThreadStartupMode allows you to configure WebView's UI thread initialization. In particular, this will let you choose whether startup should run as a single task, or should be split into smaller tasks that yield control to the UI thread Looper.
  • Create WebView instances with a restricted configuration that cannot be changed afterwards with the WebViewBuilder API. Initially, this means that it is now possible to add JavaScript interface objects that are only injected in a specified list of origins, which greatly improves the security of using it. This will then also disable any further calls to addJavascriptInterface on the constructed WebView instance, which ensures an immutable configuration.
  • Expanded on the WebViewCompat#startUpWebView API:
  • Warm up the renderer process for a Profile by calling Profile#warmUpRendererProcess . This API can be used by applications with complex WebView lifecycles to ensure that the renderer process is running, even if all WebView instances have been destroyed.
  • Profile#addQuicHints allows apps to tell WebView to prefer QUIC / HTTP3 when connecting to the provided origins.
  • Profile#preconnect allows apps to open a connection to an origin before navigating to it in order to speed up future loads.

Experimental APIs updated since 1.14.0

Version 1.15.0-rc01

December 03, 2025

androidx.webkit:webkit:1.15.0-rc01 is released. Version 1.15.0-rc01 contains these commits .

  • There are no updates since androidx.webkit:webkit:1.15.0-beta01

Version 1.15.0-beta01

۱۹ نوامبر ۲۰۲۵

androidx.webkit:webkit:1.15.0-beta01 is released. Version 1.15.0-beta01 contains these commits .

API Changes

  • Add experimental WebViewBuilder APIs ( I06828 , b/409740828 )
  • Add UiThreadStartupMode for async startup that stops isMultiProcessEnabled() call from startup up Chromium ( I524ee , b/397372092 )
  • Hiding UserAgent form factor until 1.16 release ( Ibac8a , b/430554841 , b/454438418 )
  • Update navigation API to allow applications to provide NavigationListener instances, which can optionally be configured with a custom Executor for background thread callbacks. Multiple NavigationListener instances can now be added to a single WebView .
    Additionally, this update also adds timing information to the onFirstContentfulPaint callback, providing the time information from navigation start to the paint event. ( I6aa8e , b/448580228 )
  • Adds Profile#addQuicHints which allows apps to tell WebView to prefer QUIC / HTTP3 when connecting to the provided origins. ( I8e364 , b/445339041 )
  • Updated feature constants with experimental annotations, and updated library README with more information about experimental APIs. ( I1b914 )

رفع اشکالات

Version 1.15.0-alpha03

October 08, 2025

androidx.webkit:webkit:1.15.0-alpha03 is released. Version 1.15.0-alpha03 contains these commits .

API Changes

  • Introduces a new API to set custom request headers. This is an iteration on the previous experimental API, and now allows the application to set multiple values for each header, each mapped to a different set of origin patterns. The new API also allows the application to inspect the configured headers. ( Id7d30 , b/419469873 , b/429269470 )
  • Removal of the X-Requested-With header in WebView has been cancelled, and the header will again be sent on all requests by default. The allowlist API is no longer necessary, and has been deprecated. ( I884c3 , b/447094379 )
  • Add a new API to WebSettingsCompat to allow developers to configure WebView 's back-forward cache, such as setting the timeout in seconds or page cache limits. ( I642b2 , b/432395269 )
  • Add HyperlinkContextMenu API to allow item customisation in WebView hyperlink context menu ( Idb809 , b/382654667 )
  • Add getAsyncStartUpLocations API for debugging cases where WebView was started up asynchronously without using the startUpWebView API. ( I6bf4b , b/417434566 )

Version 1.15.0-alpha02

۲۷ آگوست ۲۰۲۵

androidx.webkit:webkit:1.15.0-alpha02 is released. Version 1.15.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Adds Profile#preconnect which allows apps to open a connection to an origin before navigating to it in order to speed up future loads. ( I8db41 )
  • A new prerenderUrlAsync API has been added to WebViewCompat , allowing applications to speculatively prerender URLs before they are displayed in a WebView.
    Prerendering can dramatically improve loading performance by fetching the page ahead of time. When the user navigates to the URL, the prerendered page is displayed instantly.
    These APIs were previously released as experimental, and can now be used without the @OptIn annotation. ( Ie14f5 )
  • You can now specify a set of profiles to load synchronously when calling the startUpWebView API. This is configured by passing the profile names to a new method in WebViewStartUpConfig.Builder ( I9a6e6 )
  • Add a new API to WebSettingsCompat to enabled/disable BackForwardCache on the WebSettings object. This API was previously released as experimental, and can now be used without the @OptIn annotation. ( Ie413b )
  • Add support for overriding User-Agent form factors, The UserAgentMetadata class has new methods to get and set user-agent metadata form factors. The UserAgentMetadata.Builder has a new setFormFactors() method for overriding the Sec-CH-UA-Form-Factors User-Agent client hint. The current override values can be retrieved via the new getFormFactors() method. ( I6d08c , b/430554841 )

API Changes

  • Add API to ProcessGlobalConfig to configure WebView 's UI thread initialization ( I5e85a , b/433273850 , b/397372092 )
  • Add a new feature name for WebViewStartupConfig.Builder#setProfilesToLoadDuringStartup API ( I36451 )
  • Moving the default minSdk from API 21 to API 23 ( Ibdfca , b/380448311 , b/435705964 , b/435705223 )
  • Update origin matched header API to allow overwriting header values by calling setOriginMatchedHeader multiple times for the same header name. Also adds a new hasOriginMatchedHeader method to check if the header name is already in use.
    This change also marks the API as experimental, as it currently only supports setting a single value and origin mapping for each header value, and it will likely undergo changes in the future to make it support multiple values mapped to different origins. ( I03365 , b/419469873 , b/429269470 )
  • The UI thread requirement for Profile#prefetchUrlAsync() has been removed. It can now be called from any thread. ( I83d57 )
  • The OutcomeReceiverCompat interface has been removed in favor of the official androidx.core.os.OutcomeReceiverCompat version. The library now requires compileSdk 35 or higher. ( Ie1ea5 )
  • Renames [is/set]IncludeCookiesOnShouldInterceptRequestEnabled to [are/set]CookiesIncludedInShouldInterceptRequest in WebSettingsCompat . ( Ife9e9 , b/428924452 )
  • Adding experimental API annotations to Profile.ExperimentalUrlPrefetch that had previously been omitted. ( Ic54eb , b/417458061 )

Version 1.15.0-alpha01

۲ ژوئیه ۲۰۲۵

androidx.webkit:webkit:1.15.0-alpha01 is released. Version 1.15.0-alpha01 contains these commits .

ویژگی‌های جدید

  • A new API to set HTTP header name-value pairs on requests to specific origins.
    The Profile.setOriginMatchedHeader method lets the application specify that the header name and value should be set on all HTTP/HTTPS requests to the origins that match the provided allowlist when sent from WebViews and service workers that use the given Profile. The API only allows a single mapping for each header name, and will throw an exception if the header name is already set.
    Use Profile.clearOriginMatchedHeader to remove an existing mapping, and Profile.clearAllOriginMatchedHeaders to remove all mappings. ( Ida7f1 , b/419469873 )
  • A new API to access and set cookies as part of shouldInterceptRequest callbacks for WebView and Service Workers.
    App developers who currently access the CookieManager API as part of their shouldInterceptRequest can now enable cookie headers directly by calling setIncludeCookiesOnShouldInterceptRequest . This will then cause WebView to add a Cookie header to the WebResourceRequest.getRequestHeaders() map which will be the exact cookies that apply to the request. This will also correctly handle any partitioned cookies.
    Apps can provide Set-Cookie header values through the newly added WebResourceResponseCompat.setCookies API. The Set-Cookie values added there will be processed by WebView as part of the response handling. ( Idbfd1 , b/414769380 )
  • A new experimental API to warm up the renderer process for a Profile .
    This API can be used by applications with complex WebView lifecycles to ensure that the renderer process is running, even if all WebView instances have been destroyed. ( Ia8fc8 )

API Changes

  • Add a new method to the experimental Navigation interface to provide the URL of the navigation. ( I1c6c0 )
  • Update the Profile Prefetch feature name to clarify that the Prefetch API can now be invoked on a background thread. ( I7c83a )

Version 1.14

Version 1.14.0

۴ ژوئن ۲۰۲۵

androidx.webkit:webkit:1.14.0 is released. Version 1.14.0 contains these commits .

Important changes since 1.13.0

  • Introducing the PaymentRequest API for invoking Android native payment apps through org.chromium.intent.action.PAY intent. PaymentRequest is disabled by default and WebView host apps can call WebSettingsCompat.setPaymentRequestEnabled(settings, true) to enable it. In addition, PaymentRequest requires a <queries> tag in AndroidManifest.xml . See documentation for setPaymentRequestEnabled() for more information.
  • Introducing the experimental Navigation API for enhanced web navigation tracking and management within WebView . These APIs provide detailed information about navigation events. Get started by calling WebViewCompat.setNavigationClient with an implementation of the new WebNaviagationClient interface to get detailed information about page navigation. For more information about the navigation lifecycle, please see the Life of a Navigation Presentation .

Version 1.14.0-rc01

۲۰ مه ۲۰۲۵

androidx.webkit:webkit:1.14.0-rc01 is released. Version 1.14.0-rc01 contains these commits .

  • There are no changes from 1.14.0-beta01 .

Version 1.14.0-beta01

۷ مه ۲۰۲۵

androidx.webkit:webkit:1.14.0-beta01 is released. Version 1.14.0-beta01 contains these commits .

API Changes

Version 1.14.0-alpha01

۹ آوریل ۲۰۲۵

androidx.webkit:webkit:1.14.0-alpha01 is released. Version 1.14.0-alpha01 contains these commits .

ویژگی‌های جدید

  • Introducing the PaymentRequest API for invoking Android native payment apps through org.chromium.intent.action.PAY intent. PaymentRequest is disabled by default and WebView host apps can call WebSettingsCompat.setPaymentRequestEnabled(settings, true) to enable it. In addition, PaymentRequest requires a <queries> tag in AndroidManifest.xml . See documentation for setPaymentRequestEnabled() for more information. ( I3304e , b/404920055 )
  • Introducing Experimental Navigation Callbacks. This release introduces experimental APIs for enhanced web navigation tracking and management within WebView . These APIs provide detailed information about navigation events. Key Features:
    • WebNavigationClient Interface: Introduces a new interface, WebNavigationClient , with callbacks for navigation events:
    • onNavigationStarted(Navigation navigation) : Notifies when a navigation begins.
    • onNavigationRedirected(Navigation navigation) : Notifies when a navigation is redirected.
    • onNavigationCompleted(Navigation navigation) : Notifies when a navigation completes.
    • Navigation Interface: Provides detailed information about a navigation, including: URL, page initiation status, same-document status, reload status, history status, back/forward status, commit status, error page status, status code, and session restore status. The Navigation object serves as a unique identifier for each navigation, allowing developers to correlate related navigation events.
    • Page class: Introduces the Page class, which serves as a key for page-associated data. ( I351a6 )
  • Introduce a new experimental API to toggle the behaviour of caching provider objects. ( I14636 )

API Changes

  • Updated the PROFILE_URL_PREFETCH feature value in WebViewFeature . ( I606fd )
  • Adds WebViewCompat#saveState , akin to WebView#saveState , but allows restricting the size of the returned state and deciding whether or not to save forward history entries. ( Iea7d6 )
  • Add maxPrerenders config to SpeculativeLoadingConfig API ( I67245 )

Version 1.13

Version 1.13.0

۱۲ مارس ۲۰۲۵

androidx.webkit:webkit:1.13.0 is released. Version 1.13.0 contains these commits .

Important changes since 1.12.0

  • Introduce a new experimental API for Url prerendering to allow developers to speculative prerender candidate urls resulting in faster navigations. ( I0cfe7 )
  • Introducing a set of new APIs to delete browsing data stored by WebView . The new APIs in WebStorageCompat should be preferred over the existing APIs in android.webkit.WebStorage , as they will guarantee deletion of all local storage, including the network cache and cookies, as well as any installed service workers. If new storage APIs are introduced in the future, then these new methods will be updated to include them in the storage deleted. ( Iad54f , b/382273208 )
  • Add setPartitionedCookiesEnabled API. This will allow developers to enable and disable partitioned cookies in WebView . ( Ic506a , b/364904765 )
  • Add socket tagging API to WebView for accounting of WebView 's network traffic using NetworkStatsManager / TrafficStats . This feature will only be available from WebView M133. ( Ica441 , b/374932688 )
  • Add experimental WebView async startup API. ( I94b8a )
  • URL Prefetching in Profile: Introduced a new API in Profile to allow developers to trigger URL prefetching. Prefetch Clearing: Added an API to clear ongoing prefetches.( I42c5c )
  • Deprecate WebView.startSafeBrowsing . ( If5626 )

Version 1.13.0-rc01

۲۶ فوریه ۲۰۲۵

androidx.webkit:webkit:1.13.0-rc01 is released. This release contains no changes from the 1.13.0-beta01 release.

Version 1.13.0-beta01

۱۲ فوریه ۲۰۲۵

androidx.webkit:webkit:1.13.0-beta01 is released. Version 1.13.0-beta01 contains these commits .

API Changes

  • Add Async suffix to prerender API. Rename any Data to Header in NoVarySearch to reflect the new name. ( Ie91c9 )
  • Add executor parameter to the url prerendering API. Also, restricting the API to be called only from the UI thread. ( I50520 )
  • Add an API to configure cache config for the profile prefetch requests. It also applies to Prerender requests initiated from WebViews associated with this Profile. ( Iebb6e )

رفع اشکالات

  • Change behavior of URLUtilCompat.guessFileName to only use the mimeType parameter to suggest an extension for filenames derived from the URL parameter. ( I53ecd , b/382864232 )

Version 1.13.0-alpha03

January 15, 2025

androidx.webkit:webkit:1.13.0-alpha03 is released. Version 1.13.0-alpha03 contains these commits .

ویژگی‌های جدید

  • Introduce a new experimental API for Url prerendering to allow developers to speculative prerender candidate urls resulting in faster navigations. ( I0cfe7 )
  • Introducing a set of new APIs to delete browsing data stored by WebView . The new APIs in WebStorageCompat should be preferred over the existing APIs in android.webkit.WebStorage , as they will guarantee deletion of all local storage, including the network cache and cookies, as well as any installed service workers. If new storage APIs are introduced in the future, then these new methods will be updated to include them in the storage deleted. ( Iad54f , b/382273208 )
  • Add setPartitionedCookiesEnabled API. This will allow developers to enable and disable partitioned cookies in WebView . ( Ic506a , b/364904765 )

API Changes

  • Change thread requirement for Prefetch API to only be called on the UI thread. ( I866b5 )
  • Update WebAuthn methods to highlight that they must be called on the UI thread. This requirement is enforced by the implementation already, and this change only adds the relevant annotation. ( I6d6ba )

Version 1.13.0-alpha02

۱۱ دسامبر ۲۰۲۴

androidx.webkit:webkit:1.13.0-alpha02 is released. Version 1.13.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Add socket tagging API to WebView for accounting of WebView 's network traffic using NetworkStatsManager / TrafficStats . This feature will only be available from WebView M133. ( Ica441 , b/374932688 )

API Changes

  • Update Prefetch API by renaming PrefetchParameter to SpeculativeLoadingParamaters , introducing new PrefetchNetworkException , replacing PrefetchOperationCallback with OutcomeReceiverCompat and update the javadoc. ( If5072 )
  • Get diagnostic information from WebView async startup API.
  • Provide an option for apps to only trigger init that doesn't block the UI thread. ( I9bf2b )

رفع اشکالات

  • This library now uses JSpecify nullness annotations , which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). ( I0e4c5 , b/326456246 )

Version 1.13.0-alpha01

۱۳ نوامبر ۲۰۲۴

androidx.webkit:webkit:1.13.0-alpha01 is released. Version 1.13.0-alpha01 contains these commits .

ویژگی‌های جدید

  • Add experimental WebView async startup API. ( I94b8a )
  • URL Prefetching in Profile: Introduced a new API in Profile to allow developers to trigger URL prefetching. Prefetch Clearing: Added an API to clear ongoing prefetches. ( I42c5c )

API Changes

  • Deprecate WebView.startSafeBrowsing . ( If5626 )

Version 1.12

Version 1.12.1

۲ اکتبر ۲۰۲۴

androidx.webkit:webkit:1.12.1 is released. Version 1.12.1 contains these commits .

رفع اشکالات

  • Resolve the issue that prevented the 1.12.0 APIs from being available in the release.

Version 1.12.0

۱۸ سپتامبر ۲۰۲۴

androidx.webkit:webkit:1.12.0 is released. Version 1.12.0 contains these commits .

Important changes since 1.11.0

  • Add a new API to WebSettingsCompat to enable/disable BackForwardCache for this WebSettings . This API is experimental and can be changed in the future. ( aosp/3111705 )
  • Add a new API to WebSettingsCompat to control the Speculative Loading behavior for this WebSettings . Only Prerender is available for now. This API is experimental and can be changed in the future. ( I13962 )
  • Added a new API to enable Web Authentication in WebView . Developers can enable/disable WebAuthn calls in a WebView for their apps using WebSettingsCompat#setWebAuthenticationSupport . ( I8187f )

Version 1.12.0-rc01

۴ سپتامبر ۲۰۲۴

androidx.webkit:webkit:1.12.0-rc01 is released. This release contains no changes from the 1.12.0-beta01 release.

Version 1.12.0-beta01

۲۱ آگوست ۲۰۲۴

androidx.webkit:webkit:1.12.0-beta01 is released. Version 1.12.0-beta01 contains these commits .

رفع اشکالات

  • Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (eg R8 version 3.3) and for all builds when using AGP 8.1 or later (eg D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. ( Ia60e0 , b/345472586 )

Version 1.12.0-alpha02

۱۲ ژوئن ۲۰۲۴

androidx.webkit:webkit:1.12.0-alpha02 is released. Version 1.12.0-alpha02 contains these commits .

ویژگی‌های جدید

  • Add a new API to WebSettingsCompat to enabled/disable BackForwardCache . This API is experimental and can be changed in the future. ( I64a38 )
  • Add a new API to WebSettingsCompat to control the Speculative Loading behavior for this WebSettings. Only Prerender is available for now. This API is experimental and can be changed in the future. ( I13962 )

API Changes

  • Some methods are now documented with @UiThread where appropriate. ( I6c7e0 ), ( I44541 )
  • Thread-safe methods are now documented with @AnyThread . ( I70189 )
  • Increasing minSdkVersion from 19 to 21. ( Id7a43 )

Version 1.12.0-alpha01

۱۷ آوریل ۲۰۲۴

androidx.webkit:webkit:1.12.0-alpha01 is released. Version 1.12.0-alpha01 contains these commits .

API Changes

  • Added a new API to enable Web Authentication in WebView. Developers can enable/disable WebAuthn calls in a WebView for their apps using WebSettingsCompat#setWebAuthenticationSupport . ( I8187f )

Version 1.11

Version 1.11.0

۱ مه ۲۰۲۴

androidx.webkit:webkit:1.11.0 is released. Version 1.11.0 contains these commits .

Important changes since 1.10.0

  • Allow apps to control audio playback in WebView through the new setAudioMuted and isAudioMuted APIs, which are analogous to muting a tab in Chrome.
  • Introduced URLUtilCompat , which supports parsing of Content-Disposition headers that use the filename* encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse the Content-Disposition header where a suggested file name based on URL and MIME-type is not desired.

Version 1.11.0-rc01

April 3, 2024

androidx.webkit:webkit:1.11.0-rc01 is released. This release contains no changes from the 1.11.0-beta01 release.

Version 1.11.0-beta01

March 20, 2024

androidx.webkit:webkit:1.11.0-beta01 is released without any notable changes. Version 1.11.0-beta01 contains these commits .

Version 1.11.0-alpha02

February 21, 2024

androidx.webkit:webkit:1.11.0-alpha02 is released. Version 1.11.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Add setAudioMuted and isAudioMuted methods for muting (and unmuting) WebViews . This method will allow you to prevent a WebView from playing audio. ( Ie7a33 )

API Changes

  • URLUtilCompat is made final as it should not be subclassed. ( I49ec1 )

Version 1.11.0-alpha01

۷ فوریه ۲۰۲۴

androidx.webkit:webkit:1.11.0-alpha01 is released. Version 1.11.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Add compatibility for URLUtil.guessFileName . The compatibility version in URLUtilCompat supports parsing of Content-Disposition headers that use the filename* encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse the Content-Disposition header where a suggested file name based on URL and MIME-type is not desired. ( If6ae7 , b/309927164 )

Version 1.10

Version 1.10.0

January 24, 2024

androidx.webkit:webkit:1.10.0 is released. Version 1.10.0 contains these commits.

Important changes since 1.9.0

Version 1.10.0-rc01

۱۰ ژانویه ۲۰۲۴

androidx.webkit:webkit:1.10.0-rc01 is released. This release contains no changes from the 1.10.0-beta01 release.

Version 1.10.0-beta01

۱۳ دسامبر ۲۰۲۳

androidx.webkit:webkit:1.10.0-beta01 is released. Version 1.10.0-beta01 contains these commits.

  • No functional changes from 1.10.0-alpha01 .

Version 1.10.0-alpha01

۲۹ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.10.0-alpha01 is released. Version 1.10.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Added a new API to WebSettingsCompat to control the experimental Android WebView Media Integrity API behaviour by either disabling the API entirely, or restrict sharing the application identity in the API response. This can be toggled for all origins and on a per origin basis.

Version 1.9

Version 1.9.0

۲۹ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.9.0 is released. Version 1.9.0 contains these commits.

Important changes since 1.8.0

  • Added a new multi-profile API for WebViews.
  • Added an API to inject and run Javascript before page load.
    • The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a WebView which are guaranteed to run before any page scripts are executed. The API allows the app to specify a target list of origins for the script to be enabled on, ensuring that it only runs on intended pages. Unlike WebView#evaluateJavascript , this API will allow execution of scripts in embedded Iframes when they load. Apps can use this new API in combination with WebViewCompat#addWebMessageListener to set up two-way communication with JavaScript in the page in a reliable way.
  • Added APIs to modify how Privacy Sandbox Attribution Reporting events are registered.
    • We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether attribution sources and triggers are registered as coming from the app itself or coming from the web content in the WebView. This method can also be used to disable Attribution Reporting in WebView. Additionally we added a new API WebSettingsCompat#getAttributionRegistrationBehavior to get the current behavior.
    • For more information see the Privacy Sandbox documentation .
  • Added APIs to override user-agent metadata for client hints.

Version 1.9.0-rc01

۱۵ نوامبر ۲۰۲۳

androidx.webkit:webkit:1.9.0-rc01 is released. This release contains no changes from the 1.9.0-beta01 release.

Version 1.9.0-beta01

November 1, 2023

androidx.webkit:webkit:1.9.0-beta01 is released. Version 1.9.0-beta01 contains these commits.

API Changes

  • Address user-agent metadata API's nullability issue. We update BrandVersion class to use builder pattern, make the UserAgentMetadata class's getters and setters nullability consistent. ( Ibf195 )
  • Annotating ProfileStore , WebViewCompat#setProfile and WebViewCompat.getProfile with @UiThread . ( I499b2 )

Version 1.9.0-alpha01

۱۸ اکتبر ۲۰۲۳

androidx.webkit:webkit:1.9.0-alpha01 is released. Version 1.9.0-alpha01 contains these commits.

ویژگی‌های جدید

  • We added the multi-profile API which allows you to have separate browsing sessions between WebViews , each profile has its own data (eg cookies). You can create profiles, assign them to WebView instances, and retrieve them later for any data access. There is a singleton class ProfileStore to help you manage profiles by creation or deletion with APIs; getOrCreateProfile , getProfile , getAllProfileNames and deleteProfile . The Profile class will have different APIs to use to get associated data with this profile such as its name, GeoLocationPermissions , ServiceWorkerController , CookieManager and WebStorage . Each WebView will run with the default profile by default however, you can change that using WebViewCompat#setProfile Related to that, a WebView 's profile can be retrieved using WebViewCompat#getProfile . ( I32d22 )
  • Add APIs to modify how Attribution Reporting events are registered. We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether sources and triggers are registered as coming from the app itself or coming from the web content in the WebView . This method can also be used to disable Attribution Reporting in WebView . Additionally we added a new API WebSettingsCompat#getAttributionRegistrationBehavior to get the current behavior. For more information see the Privacy Sandbox documentation . ( I661f2 )
  • Add APIs to override user-agent metadata. We introduced a new API WebSettingsCompat#setUserAgentMetadata to override the user-agent metadata for WebView, which is used to populate the user-agent client hints, and we also added another new API WebSettingsCompat#getUserAgentMetadata to get current user-agent overrides. We encourage apps to use the new API to set the right override values instead of relying on changing user-agent. ( I74500 )
  • Add an API to inject Javascript to be run during page load. The WebViewCompat.addDocumentStartJavascript API allows apps to inject scripts into a WebView which will be run before any page scripts are executed. The API allows the app to specify a target list of origins for the script to be enabled on, ensuring that it only runs on intended pages. Unlike WebView.evaluateJavascript , this API will allow execution of scripts in embedded Iframes when they load. ( Ide063 )

نسخه ۱.۸

Version 1.8.0

۶ سپتامبر ۲۰۲۳

androidx.webkit:webkit:1.8.0 is released. Version 1.8.0 contains these commits.

Important changes since 1.7.0

Version 1.8.0-rc01

۹ آگوست ۲۰۲۳

androidx.webkit:webkit:1.8.0-rc01 is released with no changes since 1.8.0-beta01 . Version 1.8.0-rc01 contains these commits.

Version 1.8.0-beta01

۲۶ ژوئیه ۲۰۲۳

androidx.webkit:webkit:1.8.0-beta01 is released with no changes since 1.8.0-alpha01 . Version 1.8.0-beta01 contains these commits.

Version 1.8.0-alpha01

۷ ژوئن ۲۰۲۳

androidx.webkit:webkit:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.

API Changes

  • See the External Contribution section.

External Contribution

  • Add support for passing ArrayBuffer over WebMessagePortCompat#postMessage , JsReplyProxy#postMessage and WebViewCompat#postWebMessage , receiving ArrayBuffer from JavaScript over WebMessagePortCompat and WebMessageListener , and receiving transferable ArrayBuffer from JavaScript over WebMessagePortCompat . Please note that this API will only be available from WebView version 116. ( Ie7567 , b/251152171 )

Version 1.7

Version 1.7.0

۲۴ مه ۲۰۲۳

androidx.webkit:webkit:1.7.0 is released. Version 1.7.0 contains these commits.

Important changes since 1.6.0

  • We added support for Image drag in WebView . You can enable your users to drag images out of the WebView by adding the new DropDataContentProvider to your app's manifest as described in the class documentation.
  • We added the ProcessGlobalConfig#setDirectoryBasePaths(Context,File,File) API which can be used to set the base directories that WebView will use for the current process. As with all methods on ProcessGlobalConfig , this method must be called before the first instance of WebView is instantiated. This method is added to provide Android framework the capability to tweak WebView settings. For general purpose applications, using this method is not recommended.

Version 1.7.0-rc01

۱۰ مه ۲۰۲۳

androidx.webkit:webkit:1.7.0-rc01 is released with no changes since 1.7.0-beta01 . Version 1.7.0-rc01 contains these commits.

Version 1.7.0-beta01

۵ آوریل ۲۰۲۳

androidx.webkit:webkit:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits.

API Changes

  • Minor change to feature flag and method name and make setDirectoryBasePaths() accept File instead of String ( Ib0d0a )

Version 1.7.0-alpha03

March 8, 2023

androidx.webkit:webkit:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • Add ProcessGlobalConfig#setDirectoryBasePath(String, String) API which can be used to set the base directories that WebView will use for the current process. ( Ibd1a1 , b/250553687 )

رفع اشکالات

  • Fix invalid ProGuard rule causing build errors when using DexGuard ( Ia65c2 , b/270034835 )

Version 1.7.0-alpha02

۸ فوریه ۲۰۲۳

androidx.webkit:webkit:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

رفع اشکالات

  • Documentation bugs for DropDataContentProvider .

Version 1.7.0-alpha01

۲۵ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

ویژگی‌های جدید

  • We are adding support for Image drag in WebView . You can enable your users to drag images out of the WebView by adding the new DropDataContentProvider to your app's manifest. ( 05a1a6 )

Version 1.6

Version 1.6.1

March 22, 2023

androidx.webkit:webkit:1.6.1 is released. Version 1.6.1 contains these commits.

رفع اشکالات

  • Fix proguard parse error ( Ia65c2 )

نسخه ۱.۶.۰

۲۵ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.6.0 is released. Version 1.6.0 contains these commits.

Important changes since 1.5.0

  • A new ProcessGlobalConfig API has been added to allow apps to provide configuration settings that need to be set before loading WebView, such as the WebView data directory suffix. The configuration should be set up and applied as early as possible during application startup, to ensure that it happens before any other thread can call a method that loads WebView into the process.
  • A new CookieManagerCompat API has been added to expand android.webkit.CookieManager with a new getCookieInfo method, which retrieves all attributes for all cookies set on a specific URL. This differs from the existing getCookie API in CookieManager which returns only the name and value attributes of the cookies.
  • WebSettingsCompat has new methods to enable/disable the effect of EnterpriseAuthenticationAppLinkPolicy if set by admin in WebView , and to get the current setting . This feature lets WebView open an Authentication app instead of opening the authentication URL. This feature has no effect on devices that are not managed by an enterprise policy.
  • Adding a new API to WebSettingsCompat to let applications explicitly send the app package name in the X-Requested-With header to allowlisted origins. The header has traditionally been sent on every request from WebView .

Version 1.6.0-rc01

۱۱ ژانویه ۲۰۲۳

androidx.webkit:webkit:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

رفع اشکالات

  • Fixed NullPointerException in WebViewFeature.isStartupFeatureSupported(Context, String) when running on SDK < L. ( Ic7292 )

Version 1.6.0-beta01

۷ دسامبر ۲۰۲۲

androidx.webkit:webkit:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

API Changes

  • ProcessGlobalConfig has been changed to use a normal constructor and a static apply method. The apply method should only be called once per process, as early as possible, and will throw IllegalStateException if called more than once. ProcessGlobalConfig objects no longer have any restrictions on how many times setters can be called. ( I456c3 )

Version 1.6.0-alpha03

November 9, 2022

androidx.webkit:webkit:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

ویژگی‌های جدید

  • Add ProcessGlobalConfig class enabling users to set process global config before loading WebView . WebView has some process-global configuration parameters that cannot be changed once WebView has been loaded (eg the WebView data directory). This class allows apps to set these parameters. The configuration should be set up and applied as early as possible during application startup, to ensure that it happens before any other thread can call a method that loads WebView into the process. ( I7c0e0 , b/250553687 )
  • Adding new API to let applications explicitly send the app package name in the X-Requested-With header to allowlisted origins. The header has traditionally been sent on every request from WebView . ( I0adfe , b/226552535 )

API Changes

  • The WebSettingsCompat#setAlgorithmicDarkeningAllowed API is supported on all Android versions in WebView version 105 and later. Previous versions of WebView only supported the API on Android Q and later. As a result, this api is no longer marked @RequiresApi(Build.VERSION_CODES.Q) . ( I3ac1d )

Version 1.6.0-alpha02

October 24, 2022

androidx.webkit:webkit:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Adds a new CookieManagerCompat class along with a getCookieInfo API which retrieves all attributes for all cookies set on a specific URL. This differs from the existing getCookie API in CookieManager which returns only the name and value attributes of the cookies. ( I07365 , b/242161756 )

Version 1.6.0-alpha01

۲۴ آگوست ۲۰۲۲

androidx.webkit:webkit:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Added APIs in WebSettingsCompat to enable/disable the effect of EnterpriseAuthenticationAppLinkPolicy if set by admin in WebView . This feature lets WebView open an Authentication app instead of opening the authentication URL. This feature has no effect on devices that are not managed by an enterprise policy.

نسخه ۱.۵.۰

نسخه ۱.۵.۰

۲۴ آگوست ۲۰۲۲

androidx.webkit:webkit:1.5.0 is released. Version 1.5.0 contains these commits.

Important changes since 1.4.0

  • A new setAlgorithmicDarkeningAllowed API on WebSettingsCompat replaces the old setForceDark and setForceDarkStrategy APIs. Apps targeting SDK 33 and higher (T) should use the new API, as the old API will no longer have any effect for those apps.
  • An allow-list of URLs to use the configured proxy can now be set through ProxyCofig.Builder by setting setReverseBypassEnabled to true . When this is in effect, all other URLs will bypass the configured proxy.

Version 1.5.0-rc01

۱۰ آگوست ۲۰۲۲

androidx.webkit:webkit:1.5.0-rc01 is released with no changes since 1.5.0-beta01 . Version 1.5.0-rc01 contains these commits.

Version 1.5.0-beta01

۲۹ ژوئن ۲۰۲۲

androidx.webkit:webkit:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Alogrithimic Darkening related APIs are now annotated to require API level Q. The API will not have any effect on API levels < Q, since dark theme is not an option on these devices. ( I0905e )

Version 1.5.0-alpha01

۱۸ مه ۲۰۲۲

androidx.webkit:webkit:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.

ویژگی‌های جدید

  • Add a new getVariationsHeader() method on WebViewCompat to get the X-Client-Data header value sent by the WebView . The returned value will be a base64 encoded ClientVariations protobuf.
  • Add APIs on WebSettingsCompat to allow/disallow algorithmic darkening for app with targetSdk >= 33. ( I29597 )

API Changes

  • Add a new method in ProxyCofig.Builder to set reverse bypass. Setting reverse bypass to true means only URLs in the bypass list will use the proxy settings. ( I9eaa2 , b/168728599 )

رفع اشکالات

  • Fixed a typo in dark theme documentation. ( I36ebf , b/194343633 )
  • Fixed a bug where WebViewAssetLoader.Builder methods were unintentionally order-dependent. ( If420d , b/182196765 )

نسخه ۱.۴.۰

نسخه ۱.۴.۰

December 16, 2020

androidx.webkit:webkit:1.4.0 is released. Version 1.4.0 contains these commits.

Major changes since 1.3.0

  • Added a new setSafeBrowsingAllowlist() API to replace setSafeBrowsingWhitelist() . This helps apps update their code to avoid non-inclusive terminology, while still supporting the same range of Android SDKs and WebView versions as the deprecated API.
  • Fixed a bug in setProxyOverride that caused fallback rules not being correctly applied.

Version 1.4.0-rc02

December 2, 2020

androidx.webkit:webkit:1.4.0-rc02 is released. Version 1.4.0-rc02 contains these commits.

رفع اشکالات

  • Fixes fallback rules not being correctly applied when using setProxyOverride.

Version 1.4.0-rc01

November 11, 2020

androidx.webkit:webkit:1.4.0-rc01 is released with no changes since 1.4.0-beta01 . Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta01

۱۴ اکتبر ۲۰۲۰

androidx.webkit:webkit:1.4.0-beta01 is released with no changes since 1.4.0-alpha01 . Version 1.4.0-beta01 contains these commits.

Version 1.4.0-alpha01

۱۶ سپتامبر ۲۰۲۰

androidx.webkit:webkit:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.

API Changes

  • Added a new WebViewCompat#setSafeBrowsingAllowlist() API to replace setSafeBrowsingWhitelist() . This helps apps update their code to avoid non-inclusive terminology, while still supporting the same range of Android SDKs and WebView versions as the deprecated API. ( I8d65d )

نسخه ۱.۳.۰

نسخه ۱.۳.۰

۱۹ آگوست ۲۰۲۰

androidx.webkit:webkit:1.3.0 is released. Version 1.3.0 contains these commits.

Major changes since 1.2.0

  • ForceDarkStrategy API provides more control to WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener and its related APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.
  • isMultiProcessEnabled API to check whether WebView is running in multi process. This is possible starting in Android O and it means web content is rendered in a sandboxed renderer process separate to the application process. This sandboxed renderer may be shared with other WebViews in the same application but it's not shared with other application processes.

Version 1.3.0-rc02

۵ آگوست ۲۰۲۰

androidx.webkit:webkit:1.3.0-rc02 is released. Version 1.3.0-rc02 contains these commits.

رفع اشکالات

  • This fixes a compatibility issue where WebMessageListener would sometimes crash during local development if your app was started with Android Studio instant run.

Version 1.3.0-rc01

June 24, 2020

androidx.webkit:webkit:1.3.0-rc01 is released with no changes since 1.3.0-beta01 . Version 1.3.0-rc01 contains these commits.

Version 1.3.0-beta01

۱۰ ژوئن ۲۰۲۰

androidx.webkit:webkit:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

ویژگی‌های جدید

  • ForceDarkStrategy API to control WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.
  • MultiProcessEnabled API to check if WebView is running in multi process mode.

Version 1.3.0-alpha03

۲۷ مه ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.

API Changes

  • addWebMessageListener method now receives a Set<String> of allowed origin rules (previously a List<String> ).

Version 1.3.0-alpha02

۲۹ آوریل ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.

ویژگی‌های جدید

  • MultiProcessEnabled API to check if WebView is running in multi process mode.

API Changes

  • All dark strategy constants are now prefixed with DARK_STRATEGY .

Version 1.3.0-alpha01

۱۵ آوریل ۲۰۲۰

androidx.webkit:webkit:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

ویژگی‌های جدید

  • ForceDarkStrategy API to control WebView darkening (CSS/web content darkening versus auto darkening).
  • WebMessageListener APIs provide a simple and secure mechanism to establish communication between web contents and the WebView embedder app.

نسخه ۱.۲.۰

نسخه ۱.۲.۰

۴ مارس ۲۰۲۰

androidx.webkit:webkit:1.2.0 is released. Version 1.2.0 contains these commits.

Major changes since 1.1.0

  • Added the ForceDark API to control if WebViews should be rendered in dark mode.

Version 1.2.0-rc01

۱۹ فوریه ۲۰۲۰

androidx.webkit:webkit:1.2.0-rc01 is released with no changes since 1.2.0-beta01 . Version 1.2.0-rc01 contains these commits.

Version 1.2.0-beta01

February 5, 2020

androidx.webkit:webkit:1.2.0-beta01 is released with no changes since 1.2.0-alpha01 . Version 1.2.0-beta01 contains these commits .

Version 1.2.0-alpha01

December 18, 2019

androidx.webkit:webkit:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits .

ویژگی‌های جدید

  • ForceDark API to control if WebViews should be rendered in dark mode.

Version 1.1.0

Version 1.1.0

۷ نوامبر ۲۰۱۹

androidx.webkit:webkit:1.1.0 is released. Version 1.1.0 contains these commits .

Important changes since 1.0.0

  • Getter APIs to complement setWebViewClient() and setWebChromeClient() .
  • ProxyController API to set a network request proxy for an app's WebViews.
  • WebViewAssetLoader API to simplify loading APK assets, resources, and files from the app data directory via request interception. This allows access to web and local resources without disabling CORS.
  • TracingController API to collect WebView tracing information for debugging purposes.
  • RenderProcess APIs to manage WebView renderer services, and to detect when poorly behaved content causes WebView renderers to become unresponsive.
  • Updated existing APIs to include nullability ( @NonNull , @Nullable ) and thread ( @UiThread , @WorkerThread ) annotations.

Version 1.1.0-rc01

October 9, 2019

androidx.webkit:webkit:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits .

رفع اشکالات

  • Fixed an issue where setWebViewRenderProcessClient() could crash if passed a null client.

Version 1.1.0-beta01

۵ سپتامبر ۲۰۱۹

androidx.webkit:webkit:1.1.0-beta01 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • New InternalStoragePathHandler in WebViewAssetLoader to load files from the app's data directory.

API changes

  • ProxyConfig#getProxyRules() now returns an unmodifiable list of ProxyRule instances, which is a new class to hold a scheme filter and its corresponding proxy URL.

رفع اشکالات

  • WebViewAssetLoader defaults to a "text/plain" MIME type (rather than null) when it can't guess the MIME type from the file path.
  • WebViewAssetLoader no longer throws a NullPointerException when loading files with special characters in their path names.

Version 1.1.0-alpha02

August 7, 2019

androidx.webkit:webkit:1.1.0-alpha02 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • WebViewAssetLoader exposes the PathHandler interface to allow apps to create custom path-handling functionality.

API changes

  • WebViewAssetLoader is now a final class, since it's not meant to be subclassed.
  • WebViewAssetLoader#PathHandler implementations are now public and final.
  • Minor changes to ProxyConfig method names.
  • ProxyController : added new methods addDirect() and addDirect(String) to connect directly to servers; removed DIRECT String.
  • Updated existing APIs to include nullability ( @NonNull , @Nullable ) and thread ( @UiThread , @WorkerThread ) annotations.

Version 1.1.0-alpha01

۷ مه ۲۰۱۹

androidx.webkit:webkit:1.1.0-alpha01 is released. The commits included in this version can be found here .

ویژگی‌های جدید

  • Getter APIs to complement setWebViewClient() and setWebChromeClient()
  • ProxyController API to set a network request proxy for an app's WebViews.
  • AssetLoader API to simplify loading APK assets and resources via request interception, allowing access to web resources without disabling CORS.
  • TracingController API to collect WebView tracing information for debugging purposes.
  • RenderProcess APIs to manage WebView renderer services, and to detect when poorly behaved content causes WebView renderers to become unresponsive.

رفع اشکالات

  • Minor fixes to documentation formatting for existing APIs.