وب کیت
آخرین به روز رسانی | انتشار پایدار | کاندید را آزاد کنید | نسخه بتا | انتشار آلفا |
---|---|---|---|---|
7 مه 2025 | 1.13.0 | - | 1.14.0-بتا01 | - |
اعلام وابستگی ها
برای افزودن وابستگی به Webkit، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Maven Google را بخوانید.
وابستگیهای مصنوعات مورد نیاز خود را در فایل build.gradle
برای برنامه یا ماژول خود اضافه کنید:
شیار
dependencies { implementation "androidx.webkit:webkit:1.13.0" }
کاتلین
dependencies { implementation("androidx.webkit:webkit:1.13.0") }
برای اطلاعات بیشتر درباره وابستگیها، به افزودن وابستگیهای ساخت نگاه کنید.
بازخورد
بازخورد شما به بهتر شدن Jetpack کمک می کند. اگر مسائل جدیدی کشف کردید یا ایده هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد کتابخانه جدید، به مسائل موجود در این کتابخانه نگاهی بیندازید. با کلیک کردن روی دکمه ستاره می توانید رای خود را به یک موضوع موجود اضافه کنید.
برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.
نسخه 1.14
نسخه 1.14.0-beta01
7 مه 2025
androidx.webkit:webkit:1.14.0-beta01
منتشر شد. نسخه 1.14.0-beta01 حاوی این تعهدات است.
تغییرات API
- افزودن متن به عنوان پارامتر به
startUpWebView()
API ( Ic29cd , b/406701301 )
نسخه 1.14.0-alpha01
9 آوریل 2025
androidx.webkit:webkit:1.14.0-alpha01
منتشر شد. نسخه 1.14.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- معرفی
PaymentRequest
API برای فراخوانی برنامههای پرداخت بومی Android از طریقorg.chromium.intent.action.PAY
intent.PaymentRequest
به طور پیشفرض غیرفعال است و برنامههای میزبان WebView میتوانند باWebSettingsCompat.setPaymentRequestEnabled(settings, true)
آن را فعال کنند. علاوه بر این،PaymentRequest
به یک برچسب<queries>
درAndroidManifest.xml
نیاز دارد. برای اطلاعات بیشتر به مستنداتsetPaymentRequestEnabled()
مراجعه کنید. ( I3304e , b/404920055 ) - معرفی تماس های ناوبری تجربی. این نسخه APIهای آزمایشی را برای ردیابی و مدیریت پیمایش وب در
WebView
معرفی میکند. این APIها اطلاعات دقیقی در مورد رویدادهای ناوبری ارائه می دهند. ویژگی های کلیدی:- رابط
WebNavigationClient
: یک رابط کاربری جدید،WebNavigationClient
را با تماسهای برگشتی برای رویدادهای ناوبری معرفی میکند: -
onNavigationStarted(Navigation navigation)
: هنگامی که یک ناوبری شروع می شود اطلاع می دهد. -
onNavigationRedirected(Navigation navigation)
: هنگامی که یک ناوبری هدایت می شود، اطلاع می دهد. -
onNavigationCompleted(Navigation navigation)
: هنگامی که یک ناوبری کامل می شود اطلاع می دهد. - رابط
Navigation
: اطلاعات دقیقی را در مورد یک پیمایش ارائه می دهد، از جمله: URL، وضعیت شروع صفحه، وضعیت سند یکسان، وضعیت بارگیری مجدد، وضعیت سابقه، وضعیت برگشت/به جلو، وضعیت تعهد، وضعیت صفحه خطا، کد وضعیت، و وضعیت بازیابی جلسه. شیNavigation
به عنوان یک شناسه منحصر به فرد برای هر مسیریابی عمل می کند و به توسعه دهندگان اجازه می دهد رویدادهای ناوبری مرتبط را به هم مرتبط کنند. -
Page
class: کلاسPage
را معرفی می کند که به عنوان کلیدی برای داده های مرتبط با صفحه عمل می کند. ( I351a6 )
- رابط
- یک API آزمایشی جدید برای تغییر رفتار اشیاء ارائهدهنده حافظه پنهان معرفی کنید. ( I14636 )
تغییرات API
- مقدار ویژگی
PROFILE_URL_PREFETCH
درWebViewFeature
به روز کرد. ( I606fd ) -
WebViewCompat#saveState
را مشابهWebView#saveState
اضافه میکند، اما اجازه میدهد تا اندازه وضعیت بازگشتی را محدود کرده و تصمیم بگیرید که آیا ورودیهای تاریخچه فوروارد ذخیره شوند یا نه. ( Iea7d6 ) - افزودن پیکربندی
maxPrerenders
بهSpeculativeLoadingConfig
API ( I67245 )
نسخه 1.13
نسخه 1.13.0
12 مارس 2025
androidx.webkit:webkit:1.13.0
منتشر شد. نسخه 1.13.0 شامل این commit ها است.
تغییرات مهم از 1.12.0
- یک API آزمایشی جدید برای پیشاجرای URL معرفی کنید تا به توسعهدهندگان اجازه دهد تا URLهای کاندید را پیشاجرای فرضی کنند که منجر به پیمایش سریعتر میشود. ( I0cfe7 )
- معرفی مجموعه ای از API های جدید برای حذف داده های مرور ذخیره شده توسط
WebView
. APIهای جدید درWebStorageCompat
باید نسبت به APIهای موجود درandroid.webkit.WebStorage
ترجیح داده شوند، زیرا آنها حذف تمام فضای ذخیرهسازی محلی، از جمله حافظه پنهان شبکه و کوکیها، و همچنین تمامی سرویسدهندههای نصب شده را تضمین میکنند. اگر API های ذخیره سازی جدیدی در آینده معرفی شوند، این روش های جدید برای گنجاندن آنها در ذخیره سازی حذف شده به روز خواهند شد. ( Iad54f , b/382273208 ) - افزودن
setPartitionedCookiesEnabled
API. این به توسعه دهندگان اجازه می دهد تا کوکی های پارتیشن بندی شده را درWebView
فعال و غیرفعال کنند. ( Ic506a , b/364904765 ) - برای محاسبه ترافیک شبکه
WebView
با استفاده ازNetworkStatsManager
/TrafficStats
API برچسبگذاری سوکت را بهWebView
اضافه کنید. این ویژگی فقط ازWebView
M133 در دسترس خواهد بود. ( Ica441 , b/374932688 ) - افزودن آزمایشی
WebView
async startup API. ( I94b8a ) - واکشی از پیش URL در نمایه: یک API جدید در
Profile
معرفی کرد تا به توسعه دهندگان اجازه دهد واکشی اولیه URL را فعال کنند. Prefetch Clearing: یک API برای پاک کردن واکشیهای اولیه اضافه شده است. ( I42c5c ) -
WebView.startSafeBrowsing
را منسوخ کنید. ( If5626 )
نسخه 1.13.0-rc01
26 فوریه 2025
androidx.webkit:webkit:1.13.0-rc01
منتشر شد. این نسخه هیچ تغییری نسبت به نسخه 1.13.0-beta01
ندارد.
نسخه 1.13.0-beta01
12 فوریه 2025
androidx.webkit:webkit:1.13.0-beta01
منتشر شد. نسخه 1.13.0-beta01 حاوی این تعهدات است.
تغییرات API
- اضافه کردن پسوند Async به API پیش اجرا. نام هر داده ای را در
NoVarySearch
به Header تغییر دهید تا نام جدید منعکس شود. ( Ie91c9 ) - پارامتر executor را به API پیشاجرای url اضافه کنید. همچنین، محدود کردن API برای فراخوانی فقط از رشته UI. ( I50520 )
- برای پیکربندی پیکربندی کش برای درخواستهای واکشی پیشنمایه، یک API اضافه کنید. همچنین در مورد درخواستهای Prerender که از
WebViews
مرتبط با این نمایه آغاز شدهاند نیز اعمال میشود. ( Iebb6e )
رفع اشکال
- رفتار
URLUtilCompat.guessFileName
را تغییر دهید تا فقط از پارامترmimeType
برای پیشنهاد یک پسوند برای نام فایل های مشتق شده از پارامتر URL استفاده کنید. ( I53ecd , b/382864232 )
نسخه 1.13.0-alpha03
15 ژانویه 2025
androidx.webkit:webkit:1.13.0-alpha03
منتشر شد. نسخه 1.13.0-alpha03 حاوی این commit ها است.
ویژگی های جدید
- یک API آزمایشی جدید برای پیشاجرای URL معرفی کنید تا به توسعهدهندگان اجازه دهد تا URLهای کاندید را پیشاجرای فرضی کنند که منجر به پیمایش سریعتر میشود. ( I0cfe7 )
- معرفی مجموعه ای از API های جدید برای حذف داده های مرور ذخیره شده توسط
WebView
. APIهای جدید درWebStorageCompat
باید نسبت به APIهای موجود درandroid.webkit.WebStorage
ترجیح داده شوند، زیرا آنها حذف تمام فضای ذخیرهسازی محلی، از جمله حافظه پنهان شبکه و کوکیها، و همچنین تمامی سرویسدهندههای نصب شده را تضمین میکنند. اگر API های ذخیره سازی جدیدی در آینده معرفی شوند، این روش های جدید برای گنجاندن آنها در ذخیره سازی حذف شده به روز خواهند شد. ( Iad54f , b/382273208 ) - افزودن
setPartitionedCookiesEnabled
API. این به توسعه دهندگان اجازه می دهد تا کوکی های پارتیشن بندی شده را درWebView
فعال و غیرفعال کنند. ( Ic506a , b/364904765 )
تغییرات API
- تغییر نیاز رشته برای Prefetch API تا فقط در رشته UI فراخوانی شود. ( I866b5 )
- متدهای
WebAuthn
به روز کنید تا مشخص کنید که باید در رشته UI فراخوانی شوند. این الزام توسط پیاده سازی قبلاً اعمال می شود و این تغییر فقط حاشیه نویسی مربوطه را اضافه می کند. ( I6d6ba )
نسخه 1.13.0-alpha02
11 دسامبر 2024
androidx.webkit:webkit:1.13.0-alpha02
منتشر شد. نسخه 1.13.0-alpha02 حاوی این commit ها است.
ویژگی های جدید
- برای محاسبه ترافیک شبکه
WebView
با استفاده ازNetworkStatsManager
/TrafficStats
API برچسبگذاری سوکت را بهWebView
اضافه کنید. این ویژگی فقط ازWebView
M133 در دسترس خواهد بود. ( Ica441 , b/374932688 )
تغییرات API
- Prefetch API را با تغییر نام
PrefetchParameter
بهSpeculativeLoadingParamaters
، معرفیPrefetchNetworkException
جدید، جایگزینیPrefetchOperationCallback
باOutcomeReceiverCompat
و به روز رسانی javadoc به روز کنید. ( If5072 ) - اطلاعات تشخیصی را از WebView async startup API دریافت کنید.
- گزینهای را برای برنامهها ارائه کنید که فقط init را راهاندازی کنند که رشته رابط کاربری را مسدود نکند. ( I9bf2b )
رفع اشکال
- این کتابخانه اکنون از حاشیهنویسیهای پوچ JSpecify استفاده میکند که نوع استفاده هستند. توسعه دهندگان Kotlin باید از آرگومان کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند:
-Xjspecify-annotations=strict
(این پیش فرض با نسخه 2.1.0 کامپایلر Kotlin شروع می شود). ( I0e4c5 , b/326456246 )
نسخه 1.13.0-alpha01
13 نوامبر 2024
androidx.webkit:webkit:1.13.0-alpha01
منتشر شد. نسخه 1.13.0-alpha01 حاوی این تعهدات است.
ویژگی های جدید
- افزودن آزمایشی
WebView
async startup API. ( I94b8a ) - واکشی از پیش URL در نمایه: یک API جدید در نمایه معرفی کرد تا به توسعه دهندگان اجازه دهد واکشی اولیه URL را فعال کنند. Prefetch Clearing: یک API برای پاک کردن واکشی های اولیه اضافه شده است. ( I42c5c )
تغییرات API
-
WebView.startSafeBrowsing
را منسوخ کنید. ( If5626 )
نسخه 1.12
نسخه 1.12.1
2 اکتبر 2024
androidx.webkit:webkit:1.12.1
منتشر شد. نسخه 1.12.1 حاوی این commit ها است.
رفع اشکال
- مشکلی را که مانع از در دسترس بودن APIهای 1.12.0 در نسخه منتشر شده بود، حل کنید.
نسخه 1.12.0
18 سپتامبر 2024
androidx.webkit:webkit:1.12.0
منتشر شد. نسخه 1.12.0 شامل این commit ها است.
تغییرات مهم از 1.11.0
- یک API جدید به
WebSettingsCompat
اضافه کنید تا BackForwardCache را برای اینWebSettings
فعال/غیرفعال کنید. این API آزمایشی است و در آینده قابل تغییر است. ( aosp/3111705 ) - یک API جدید به
WebSettingsCompat
اضافه کنید تا رفتار بارگذاری گمانه زنی را برای اینWebSettings
کنترل کنید. در حال حاضر فقط Prerender در دسترس است. این API آزمایشی است و در آینده قابل تغییر است. ( I13962 ) - یک API جدید برای فعال کردن احراز هویت وب در
WebView
اضافه کرد. برنامهنویسان میتوانند با استفاده ازWebSettingsCompat#setWebAuthenticationSupport
تماسهایWebAuthn
را درWebView
برای برنامههای خود فعال/غیرفعال کنند. ( I8187f )
نسخه 1.12.0-rc01
4 سپتامبر 2024
androidx.webkit:webkit:1.12.0-rc01
منتشر شد. این نسخه هیچ تغییری نسبت به نسخه 1.12.0-beta01
ندارد.
نسخه 1.12.0-beta01
21 آگوست 2024
androidx.webkit:webkit:1.12.0-beta01
منتشر شد. نسخه 1.12.0-beta01 حاوی این تعهدات است.
رفع اشکال
- طرح دستی دسترسی به APIهای پلتفرم جدید حذف شد زیرا این به طور خودکار از طریق مدلسازی API هنگام استفاده از R8 با AGP 7.3 یا جدیدتر (مثلا R8 نسخه 3.3) و برای همه ساختها هنگام استفاده از AGP 8.1 یا بالاتر (به عنوان مثال D8 نسخه 8.1) اتفاق میافتد. به مشتریانی که از AGP استفاده نمیکنند، توصیه میشود به نسخه 8.1 یا بالاتر D8 بهروزرسانی کنند. برای جزئیات بیشتر به این مقاله مراجعه کنید. ( Ia60e0 , b/345472586 )
نسخه 1.12.0-alpha02
12 ژوئن 2024
androidx.webkit:webkit:1.12.0-alpha02
منتشر شد. نسخه 1.12.0-alpha02 حاوی این commit ها است.
ویژگی های جدید
- برای فعال/غیرفعال کردن
BackForwardCache
یک API جدید بهWebSettingsCompat
اضافه کنید. این API آزمایشی است و در آینده قابل تغییر است. ( I64a38 ) - یک API جدید به
WebSettingsCompat
اضافه کنید تا رفتار بارگذاری گمانه زنی را برای این WebSettings کنترل کنید. در حال حاضر فقط Prerender در دسترس است. این API آزمایشی است و در آینده قابل تغییر است. ( I13962 )
تغییرات API
- برخی از روشها اکنون در صورت لزوم با
@UiThread
مستند شدهاند. ( I6c7e0 )، ( I44541 ) - روشهای ایمن برای موضوع اکنون با
@AnyThread
مستند شدهاند. ( I70189 ) - افزایش
minSdkVersion
از 19 به 21. ( Id7a43 )
نسخه 1.12.0-alpha01
17 آوریل 2024
androidx.webkit:webkit:1.12.0-alpha01
منتشر شد. نسخه 1.12.0-alpha01 حاوی این commit ها است.
تغییرات API
- یک API جدید برای فعال کردن احراز هویت وب در
WebView. Developers
میتوانند با استفاده ازWebSettingsCompat#setWebAuthenticationSupport
تماسهایWebAuthn
را درWebView
برای برنامههای خود فعال/غیرفعال کنند. ( I8187f )
نسخه 1.11
نسخه 1.11.0
1 مه 2024
androidx.webkit:webkit:1.11.0
منتشر شد. نسخه 1.11.0 حاوی این commit ها است.
تغییرات مهم از 1.10.0
- به برنامهها اجازه دهید پخش صدا را در
WebView
از طریق APIهای جدیدsetAudioMuted
وisAudioMuted
کنترل کنند، که مشابه بیصدا کردن یک برگه در Chrome هستند. -
URLUtilCompat
معرفی شد که از تجزیه سرصفحههایContent-Disposition
که از ویژگی مقدار کدگذاریشدهfilename*
همانطور که در RFC 6266 تعریف شده است، پشتیبانی میکند. API سازگاری همچنین مستقیماً روشی را برای تجزیه هدرContent-Disposition
نشان می دهد که در آن نام فایل پیشنهادی بر اساس URL و نوع MIME مورد نظر نیست.
نسخه 1.11.0-rc01
3 آوریل 2024
androidx.webkit:webkit:1.11.0-rc01
منتشر شد. این نسخه هیچ تغییری نسبت به نسخه 1.11.0-beta01
ندارد.
نسخه 1.11.0-beta01
20 مارس 2024
androidx.webkit:webkit:1.11.0-beta01
بدون هیچ تغییر قابل توجهی منتشر شد. نسخه 1.11.0-beta01 حاوی این تعهدات است.
نسخه 1.11.0-alpha02
21 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha02
منتشر شد. نسخه 1.11.0-alpha02 حاوی این commit ها است.
ویژگی های جدید
- روشهای
setAudioMuted
وisAudioMuted
را برای بیصدا کردن (و بیصدا کردن)WebViews
اضافه کنید. این روش به شما امکان می دهد از پخش صدا توسطWebView
جلوگیری کنید. ( Ie7a33 )
تغییرات API
-
URLUtilCompat
نهایی شده است زیرا نباید زیرکلاس شود. ( I49ec1 )
نسخه 1.11.0-alpha01
7 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha01
منتشر شد. نسخه 1.11.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- برای
URLUtil.guessFileName
سازگاری اضافه کنید. نسخه سازگاری درURLUtilCompat
از تجزیه سرصفحههایContent-Disposition
پشتیبانی میکند که از ویژگی مقدار کدگذاریشدهfilename*
همانطور که در RFC 6266 تعریف شده است، استفاده میکند. API سازگاری همچنین مستقیماً روشی را برای تجزیه هدرContent-Disposition
نشان می دهد که در آن نام فایل پیشنهادی بر اساس URL و نوع MIME مورد نظر نیست. ( If6ae7 , b/309927164 )
نسخه 1.10
نسخه 1.10.0
24 ژانویه 2024
androidx.webkit:webkit:1.10.0
منتشر شد. نسخه 1.10.0 حاوی این commit ها است.
تغییرات مهم از 1.9.0
- یک API جدید به WebSettingsCompat اضافه کرد تا با غیرفعال کردن کامل API یا محدود کردن اشتراکگذاری هویت برنامه در پاسخ API، رفتار آزمایشی Android WebView Media Integrity API را کنترل کند. این را می توان برای همه مبداها و بر اساس مبدا تغییر داد.
نسخه 1.10.0-rc01
10 ژانویه 2024
androidx.webkit:webkit:1.10.0-rc01
منتشر شد. این نسخه هیچ تغییری نسبت به نسخه 1.10.0-beta01
ندارد.
نسخه 1.10.0-beta01
13 دسامبر 2023
androidx.webkit:webkit:1.10.0-beta01
منتشر شد. نسخه 1.10.0-beta01 حاوی این تعهدات است.
- هیچ تغییر عملکردی نسبت به
1.10.0-alpha01
وجود ندارد.
نسخه 1.10.0-alpha01
29 نوامبر 2023
androidx.webkit:webkit:1.10.0-alpha01
منتشر شد. نسخه 1.10.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- یک API جدید به
WebSettingsCompat
اضافه کرد تا با غیرفعال کردن کامل API یا محدود کردن اشتراکگذاری هویت برنامه در پاسخ API، رفتار آزمایشی Android WebView Media Integrity API را کنترل کند. این را می توان برای همه مبداها و بر اساس مبدا تغییر داد.
نسخه 1.9
نسخه 1.9.0
29 نوامبر 2023
androidx.webkit:webkit:1.9.0
منتشر شد. نسخه 1.9.0 شامل این commit ها است.
تغییرات مهم از 1.8.0
- یک API چند نمایه جدید برای WebViews اضافه شد.
- رابط Profile دارای API های مختلفی برای استفاده برای دریافت داده های مرتبط با این نمایه است، مانند نام آن، GeoLocationPermissions ، ServiceWorkerController ، CookieManager و WebStorage . این اشیاء مختص نمایه هستند و اطلاعات بین پروفایل های مختلف در برنامه به اشتراک گذاشته نمی شود.
- نمایه استفاده شده توسط یک نمونه
WebView
را می توان با استفاده از روش WebViewCompat#setProfile تغییر داد و با استفاده از WebViewCompat#getProfile بازیابی کرد. - ProfileStore به تازگی معرفی شده به شما امکان می دهد پروفایل های موجود در برنامه خود را مدیریت کنید، از جمله نمایه پیش فرض.
- APIهای WebView موجود مانند CookieManager#getInstance در نمایه پیش فرض به کار خود ادامه خواهند داد.
- یک API برای تزریق و اجرای جاوا اسکریپت قبل از بارگیری صفحه اضافه شده است.
- WebViewCompat#addDocumentStartJavascript API به برنامهها اجازه میدهد تا اسکریپتهایی را به
WebView
تزریق کنند که تضمین شده است قبل از اجرای هر اسکریپت صفحه اجرا شوند. API به برنامه اجازه می دهد تا لیست هدفی از مبداها را برای فعال کردن اسکریپت مشخص کند و اطمینان حاصل کند که فقط در صفحات مورد نظر اجرا می شود. برخلاف WebView#evaluateJavascript ، این API امکان اجرای اسکریپتها در Iframes تعبیهشده را هنگام بارگیری آنها فراهم میکند. برنامهها میتوانند از این API جدید در ترکیب با WebViewCompat#addWebMessageListener برای راهاندازی ارتباط دو طرفه با جاوا اسکریپت در صفحه به روشی مطمئن استفاده کنند.
- WebViewCompat#addDocumentStartJavascript API به برنامهها اجازه میدهد تا اسکریپتهایی را به
- APIهایی اضافه شد تا نحوه ثبت رویدادهای گزارش انتساب Privacy Sandbox را تغییر دهد.
- ما یک API WebSettingsCompat#setAttributionRegistrationBehavior را معرفی کردیم که به توسعه دهندگان اجازه می دهد پیکربندی کنند که آیا منابع و محرک های انتساب به عنوان منبعی از خود برنامه یا از محتوای وب در WebView ثبت می شوند. این روش همچنین می تواند برای غیرفعال کردن Attribution Reporting در WebView استفاده شود. علاوه بر این، برای دریافت رفتار فعلی، یک API
WebSettingsCompat#getAttributionRegistrationBehavior
اضافه کردیم. - برای اطلاعات بیشتر به مستندات جعبه ایمنی حریم خصوصی مراجعه کنید.
- ما یک API WebSettingsCompat#setAttributionRegistrationBehavior را معرفی کردیم که به توسعه دهندگان اجازه می دهد پیکربندی کنند که آیا منابع و محرک های انتساب به عنوان منبعی از خود برنامه یا از محتوای وب در WebView ثبت می شوند. این روش همچنین می تواند برای غیرفعال کردن Attribution Reporting در WebView استفاده شود. علاوه بر این، برای دریافت رفتار فعلی، یک API
- APIهایی اضافه شد تا ابرداده های عامل کاربر را برای نکات مشتری لغو کند.
- ما یک API جدید به نام WebSettingsCompat#setUserAgentMetadata را معرفی کردیم تا ابرداده عامل کاربر برای WebView را که برای پر کردن نکات کلاینت عامل کاربر استفاده میشود، نادیده بگیرد، و همچنین یک API جدید WebSettingsCompat#getUserAgentMetadata را اضافه کردهایم تا جایگزینهای فعلی عامل کاربر را دریافت کنیم. ما برنامهها را تشویق میکنیم تا هر زمان که برنامه رشته عامل پیشفرض کاربر را با استفاده از WebSettings.setUserAgentString تغییر میدهد، از API جدید برای تنظیم مقادیر نادیده مناسب استفاده کنند تا اطمینان حاصل شود که مقادیر صحیح در همه موقعیتها استفاده میشوند.
نسخه 1.9.0-rc01
15 نوامبر 2023
androidx.webkit:webkit:1.9.0-rc01
منتشر شد. این نسخه هیچ تغییری نسبت به نسخه 1.9.0-beta01
ندارد.
نسخه 1.9.0-beta01
1 نوامبر 2023
androidx.webkit:webkit:1.9.0-beta01
منتشر شد. نسخه 1.9.0-beta01 حاوی این تعهدات است.
تغییرات API
- مشکل پوچ بودن API ابرداده کاربر-عامل را برطرف کنید. ما کلاس
BrandVersion
برای استفاده از الگوی سازنده بهروزرسانی میکنیم، تهیپذیری گیرندهها و تنظیمکنندههای کلاسUserAgentMetadata
را یکسان میکنیم. ( IBF195 ) - حاشیه نویسی
ProfileStore
،WebViewCompat#setProfile
وWebViewCompat.getProfile
با@UiThread
. ( I499b2 )
نسخه 1.9.0-alpha01
18 اکتبر 2023
androidx.webkit:webkit:1.9.0-alpha01
منتشر شد. نسخه 1.9.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- ما API چند نمایه را اضافه کردیم که به شما امکان می دهد جلسات مرور جداگانه بین
WebViews
داشته باشید، هر نمایه داده های خاص خود را دارد (به عنوان مثال کوکی ها). میتوانید نمایههایی ایجاد کنید، آنها را به نمونههایWebView
اختصاص دهید، و بعداً برای دسترسی به دادهها، آنها را بازیابی کنید. یکProfileStore
کلاس singleton وجود دارد که به شما کمک می کند پروفایل ها را با ایجاد یا حذف با API ها مدیریت کنید.getOrCreateProfile
،getProfile
،getAllProfileNames
وdeleteProfile
. کلاسProfile
دارای API های مختلفی برای دریافت داده های مرتبط با این نمایه مانند نام،GeoLocationPermissions
،ServiceWorkerController
،CookieManager
وWebStorage
خواهد بود. هرWebView
به طور پیشفرض با نمایه پیشفرض اجرا میشود، اما میتوانید با استفاده ازWebViewCompat#setProfile
مربوط به آن، نمایهWebView
با استفاده ازWebViewCompat#getProfile
بازیابی کنید. ( I32d22 ) - APIهایی را اضافه کنید تا نحوه ثبت رویدادهای Attribution Reporting را تغییر دهید. یک API
WebSettingsCompat#setAttributionRegistrationBehavior
معرفی کردیم که به توسعهدهندگان اجازه میدهد پیکربندی کنند که آیا منابع و محرکها بهعنوان منبعی از خود برنامه ثبت میشوند یا از محتوای وب درWebView
. این روش همچنین می تواند برای غیرفعال کردن گزارش انتساب درWebView
استفاده شود. علاوه بر این، برای دریافت رفتار فعلی، یک APIWebSettingsCompat#getAttributionRegistrationBehavior
اضافه کردیم. برای اطلاعات بیشتر به مستندات جعبه ایمنی حریم خصوصی مراجعه کنید. ( I661f2 ) - API ها را اضافه کنید تا ابرداده های عامل کاربر را لغو کنید. ما یک API
WebSettingsCompat#setUserAgentMetadata
برای لغو فراداده عامل کاربر برای WebView، که برای پر کردن نکات مشتری عامل کاربر استفاده میشود، معرفی کردیم، و همچنین یک API جدیدWebSettingsCompat#getUserAgentMetadata
را اضافه کردیم تا جایگزینهای فعلی عامل کاربر را دریافت کنیم. ما برنامهها را تشویق میکنیم تا به جای تکیه بر تغییر عامل کاربر، از API جدید برای تنظیم مقادیر نادیده گرفتن مناسب استفاده کنند. ( I74500 ) - یک API برای تزریق جاوا اسکریپت اضافه کنید تا در حین بارگذاری صفحه اجرا شود.
WebViewCompat.addDocumentStartJavascript
API به برنامهها اجازه میدهد تا اسکریپتها را به WebView تزریق کنند که قبل از اجرای هر اسکریپت صفحه اجرا میشود. API به برنامه اجازه می دهد تا لیست هدفی از مبداها را برای فعال کردن اسکریپت مشخص کند و اطمینان حاصل کند که فقط در صفحات مورد نظر اجرا می شود. برخلافWebView.evaluateJavascript
، این API امکان اجرای اسکریپتها در Iframes تعبیهشده را هنگام بارگیری آنها فراهم میکند. ( Ide063 )
نسخه 1.8
نسخه 1.8.0
6 سپتامبر 2023
androidx.webkit:webkit:1.8.0
منتشر شد. نسخه 1.8.0 حاوی این commit ها است.
تغییرات مهم از 1.7.0
- اضافه کردن پشتیبانی برای عبور
ArrayBuffer
ازWebMessagePortCompat#postMessage
،JavaScriptReplyProxy#postMessage
وWebViewCompat#postWebMessage
، دریافتArrayBuffer
از جاوا اسکریپت بر رویWebMessagePortCompat
وWebMessageListener
قابل انتقال ازArrayBuffer
WebMessagePortCompat
. ( aosp/2596550 , b/251152171 )
نسخه 1.8.0-rc01
9 آگوست 2023
androidx.webkit:webkit:1.8.0-rc01
بدون تغییر از 1.8.0-beta01
منتشر شده است. نسخه 1.8.0-rc01 حاوی این commit ها است.
نسخه 1.8.0-beta01
26 جولای 2023
androidx.webkit:webkit:1.8.0-beta01
بدون تغییر از 1.8.0-alpha01
منتشر شد. نسخه 1.8.0-beta01 حاوی این تعهدات است.
نسخه 1.8.0-alpha01
7 ژوئن 2023
androidx.webkit:webkit:1.8.0-alpha01
منتشر شد. نسخه 1.8.0-alpha01 حاوی این commit ها است.
تغییرات API
- بخش مشارکت خارجی را ببینید.
مشارکت خارجی
- اضافه کردن پشتیبانی برای عبور
ArrayBuffer
از طریقWebMessagePortCompat#postMessage
،JsReplyProxy#postMessage
وWebViewCompat#postWebMessage
، دریافتArrayBuffer
از جاوا اسکریپت از طریقWebMessagePortCompat
وWebMessageListener
WebMessagePortCompat
, و دریافتArrayBuffer
. . لطفاً توجه داشته باشید که این API فقط از نسخهWebView
116 در دسترس خواهد بود. ( Ie7567 ، b/251152171 )
نسخه 1.7
نسخه 1.7.0
24 مه 2023
androidx.webkit:webkit:1.7.0
منتشر شد. نسخه 1.7.0 حاوی این commit ها است.
تغییرات مهم از 1.6.0
- ما پشتیبانی از کشیدن تصویر را در
WebView
اضافه کردیم. می توانید با افزودنDropDataContentProvider
جدید به مانیفست برنامه خود، همانطور که در مستندات کلاس توضیح داده شده است، به کاربران خود اجازه دهید تصاویر را به خارج ازWebView
بکشند. - ما API
ProcessGlobalConfig#setDirectoryBasePaths(Context,File,File)
را اضافه کردیم که می تواند برای تنظیم دایرکتوری های پایه ای کهWebView
برای فرآیند فعلی استفاده می کند استفاده شود. مانند همه متدها درProcessGlobalConfig
، این متد باید قبل از اینکه اولین نمونه ازWebView
نمونه سازی شود فراخوانی شود. این روش برای ارائه فریمورک اندرویدی به منظور دستکاری تنظیماتWebView
اضافه شده است. برای کاربردهای عمومی استفاده از این روش توصیه نمی شود.
نسخه 1.7.0-rc01
10 مه 2023
androidx.webkit:webkit:1.7.0-rc01
بدون تغییر از 1.7.0-beta01
منتشر شده است. نسخه 1.7.0-rc01 حاوی این commit ها است.
نسخه 1.7.0-beta01
5 آوریل 2023
androidx.webkit:webkit:1.7.0-beta01
منتشر شد. نسخه 1.7.0-beta01 حاوی این تعهدات است.
تغییرات API
- تغییر جزئی در پرچم و نام متد مشخصه و باعث میشود که
setDirectoryBasePaths()
فایل را به جای String بپذیرد ( Ib0d0a )
نسخه 1.7.0-alpha03
8 مارس 2023
androidx.webkit:webkit:1.7.0-alpha03
منتشر شد. نسخه 1.7.0-alpha03 حاوی این commit ها است.
تغییرات API
- API
ProcessGlobalConfig#setDirectoryBasePath(String, String)
را اضافه کنید که می تواند برای تنظیم دایرکتوری های پایه ای کهWebView
برای فرآیند فعلی استفاده می کند استفاده شود. ( Ibd1a1 , b/250553687 )
رفع اشکال
- اصلاح قانون نامعتبر
ProGuard
که باعث ایجاد خطا در ساخت هنگام استفادهDexGuard
می شود ( Ia65c2 , b/270034835 )
نسخه 1.7.0-alpha02
8 فوریه 2023
androidx.webkit:webkit:1.7.0-alpha02
منتشر شد. نسخه 1.7.0-alpha02 حاوی این commit ها است.
رفع اشکال
- اشکالات مستندات برای
DropDataContentProvider
.
نسخه 1.7.0-alpha01
25 ژانویه 2023
androidx.webkit:webkit:1.7.0-alpha01
منتشر شد. نسخه 1.7.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- ما در حال اضافه کردن پشتیبانی برای کشیدن تصویر در
WebView
هستیم. می توانید با افزودنDropDataContentProvider
جدید به مانیفست برنامه خود، به کاربران خود اجازه دهید تصاویر را به خارج ازWebView
بکشند. ( 05a1a6 )
نسخه 1.6
نسخه 1.6.1
22 مارس 2023
androidx.webkit:webkit:1.6.1
منتشر شد. نسخه 1.6.1 حاوی این commit ها است.
رفع اشکال
- رفع خطای تجزیه پروگارد ( Ia65c2 )
نسخه 1.6.0
25 ژانویه 2023
androidx.webkit:webkit:1.6.0
منتشر شد. نسخه 1.6.0 حاوی این commit ها است.
تغییرات مهم از 1.5.0
- یک API ProcessGlobalConfig جدید اضافه شده است تا به برنامهها اجازه دهد تنظیمات پیکربندی را که باید قبل از بارگیری WebView تنظیم شوند، مانند پسوند فهرست راهنمای داده WebView، ارائه دهند. پیکربندی باید هرچه زودتر در حین راهاندازی برنامه تنظیم و اعمال شود تا اطمینان حاصل شود که قبل از اینکه هر رشته دیگری بتواند متدی را که
WebView
در فرآیند بارگیری میکند فراخوانی کند، اتفاق میافتد. - یک CookieManagerCompat API جدید برای گسترش android.webkit.CookieManager با روش جدید
getCookieInfo
اضافه شده است، که همه ویژگیها را برای همه کوکیهای تنظیم شده در یک URL خاص بازیابی میکند. این با getCookie API موجود درCookieManager
که فقط نام و ویژگی های مقدار کوکی ها را برمی گرداند متفاوت است. -
WebSettingsCompat
روشهای جدیدی برای فعال/غیرفعال کردن اثرEnterpriseAuthenticationAppLinkPolicy
در صورت تنظیم توسط ادمین درWebView
و دریافت تنظیمات فعلی دارد. این ویژگی به WebView اجازه میدهد به جای باز کردن URL احراز هویت، یک برنامه احراز هویت را باز کند. این ویژگی روی دستگاههایی که توسط خطمشی سازمانی مدیریت نمیشوند، تأثیری ندارد. - افزودن یک API جدید به
WebSettingsCompat
برای اینکه برنامهها به طور صریح نام بسته برنامه را در هدرX-Requested-With
به مبداهای مجاز ارسال کنند. هدر به طور سنتی برای هر درخواستی ازWebView
ارسال میشود.
نسخه 1.6.0-rc01
11 ژانویه 2023
androidx.webkit:webkit:1.6.0-rc01
منتشر شد. نسخه 1.6.0-rc01 حاوی این commit ها است.
رفع اشکال
- رفع
NullPointerException
درWebViewFeature.isStartupFeatureSupported(Context, String)
هنگام اجرا بر روی SDK < L. ( Ic7292 )
نسخه 1.6.0-beta01
7 دسامبر 2022
androidx.webkit:webkit:1.6.0-beta01
منتشر شد. نسخه 1.6.0-beta01 حاوی این تعهدات است.
تغییرات API
-
ProcessGlobalConfig
برای استفاده از یک سازنده معمولی و یک روش اعمال استاتیک تغییر یافته است. متد اعمال فقط باید یک بار در هر فرآیند، در اسرع وقت فراخوانی شود، و اگر بیش از یک بار فراخوانی شود،IllegalStateException
پرتاب می کند. اشیاءProcessGlobalConfig
دیگر هیچ محدودیتی برای چند بار فراخوانی تنظیم کننده ها ندارند. ( I456c3 )
نسخه 1.6.0-alpha03
9 نوامبر 2022
androidx.webkit:webkit:1.6.0-alpha03
منتشر شد. نسخه 1.6.0-alpha03 حاوی این commit ها است.
ویژگی های جدید
- کلاس
ProcessGlobalConfig
را اضافه کنید که کاربران را قادر می سازد تا تنظیمات سراسری فرآیند را قبل از بارگیریWebView
تنظیم کنند.WebView
دارای برخی از پارامترهای پیکربندی فرآیند جهانی است که پس از بارگیریWebView
قابل تغییر نیستند (مثلاً فهرست راهنمای دادهWebView
). این کلاس به برنامه ها اجازه می دهد این پارامترها را تنظیم کنند. پیکربندی باید هرچه زودتر در حین راهاندازی برنامه تنظیم و اعمال شود تا اطمینان حاصل شود که قبل از اینکه هر رشته دیگری بتواند متدی را کهWebView
در فرآیند بارگیری میکند فراخوانی کند، اتفاق میافتد. ( I7c0e0 , b/250553687 ) - افزودن API جدید به برنامهها برای ارسال صریح نام بسته برنامه در هدر X-Requested-With به مبداهای مجاز. هدر به طور سنتی برای هر درخواستی از
WebView
ارسال میشود. ( I0adfe , b/226552535 )
تغییرات API
-
WebSettingsCompat#setAlgorithmicDarkeningAllowed
API در تمام نسخههای اندروید درWebView
نسخه 105 و جدیدتر پشتیبانی میشود. نسخههای قبلیWebView
فقط از API در Android Q و جدیدتر پشتیبانی میکردند. در نتیجه، این api دیگر@RequiresApi(Build.VERSION_CODES.Q)
علامت گذاری نمی شود. ( I3ac1d )
نسخه 1.6.0-alpha02
24 اکتبر 2022
androidx.webkit:webkit:1.6.0-alpha02
منتشر شد. نسخه 1.6.0-alpha02 حاوی این commit ها است.
ویژگی های جدید
- یک کلاس
CookieManagerCompat
جدید به همراه یک APIgetCookieInfo
اضافه می کند که همه ویژگی ها را برای همه کوکی های تنظیم شده در یک URL خاص بازیابی می کند. این باgetCookie
API موجود درCookieManager
که فقط نام و ویژگی های مقدار کوکی ها را برمی گرداند متفاوت است. ( I07365 , b/242161756 )
نسخه 1.6.0-alpha01
24 آگوست 2022
androidx.webkit:webkit:1.6.0-alpha01
منتشر شد. نسخه 1.6.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- APIهایی را در
WebSettingsCompat
اضافه کرد تا اثرEnterpriseAuthenticationAppLinkPolicy
را در صورت تنظیم توسط سرپرست درWebView
فعال یا غیرفعال کند. این ویژگی بهWebView
اجازه میدهد به جای باز کردن URL احراز هویت، یک برنامه احراز هویت را باز کند. این ویژگی روی دستگاههایی که توسط خطمشی سازمانی مدیریت نمیشوند، تأثیری ندارد.
نسخه 1.5.0
نسخه 1.5.0
24 آگوست 2022
androidx.webkit:webkit:1.5.0
منتشر شد. نسخه 1.5.0 حاوی این commit ها است.
تغییرات مهم از 1.4.0
- یک API جدید
setAlgorithmicDarkeningAllowed
درWebSettingsCompat
جایگزین APIهایsetForceDark
وsetForceDarkStrategy
قدیمی می شود. برنامههایی که SDK 33 و بالاتر (T) را هدف قرار میدهند باید از API جدید استفاده کنند، زیرا API قدیمی دیگر هیچ تأثیری برای آن برنامهها نخواهد داشت. - یک لیست مجاز از URL ها برای استفاده از پراکسی پیکربندی شده اکنون می تواند از طریق
ProxyCofig.Builder
با تنظیمsetReverseBypassEnabled
رویtrue
تنظیم شود. هنگامی که این مورد اعمال می شود، همه URL های دیگر از پروکسی پیکربندی شده عبور می کنند.
نسخه 1.5.0-rc01
10 آگوست 2022
androidx.webkit:webkit:1.5.0-rc01
بدون تغییر از 1.5.0-beta01
منتشر شده است. نسخه 1.5.0-rc01 حاوی این commit ها است.
نسخه 1.5.0-beta01
29 ژوئن 2022
androidx.webkit:webkit:1.5.0-beta01
منتشر شد. نسخه 1.5.0-beta01 حاوی این تعهدات است.
تغییرات API
- Alogrithic Darkening مربوط به API اکنون حاشیهنویسی شده است تا به سطح API Q نیاز داشته باشد. API هیچ تأثیری بر سطوح API < Q نخواهد داشت، زیرا تم تیره در این دستگاهها گزینهای نیست. ( I0905e )
نسخه 1.5.0-alpha01
18 مه 2022
androidx.webkit:webkit:1.5.0-alpha01
منتشر شد. نسخه 1.5.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- برای دریافت مقدار هدر X-Client-Data ارسال شده توسط
WebView
، یک متدgetVariationsHeader()
جدید درWebViewCompat
اضافه کنید. مقدار بازگشتی یک پروتوباف ClientVariations کدگذاری شده در base64 خواهد بود. - APIها را در
WebSettingsCompat
اضافه کنید تا تاریکی الگوریتمی برای برنامه با targetSdk >= 33 مجاز/مجاز باشد. ( I29597 )
تغییرات API
- یک روش جدید در
ProxyCofig.Builder
برای تنظیم بای پس معکوس اضافه کنید. تنظیم دور زدن معکوس بر روی true به این معنی است که فقط URL های موجود در لیست دور زدن از تنظیمات پراکسی استفاده می کنند. ( I9eaa2 , b/168728599 )
رفع اشکال
- یک اشتباه تایپی در مستندات تم تاریک رفع شد. ( I36ebf , b/194343633 )
- رفع اشکالی که در آن متدهای
WebViewAssetLoader.Builder
ناخواسته به سفارش وابسته بودند. ( If420d , b/182196765 )
نسخه 1.4.0
نسخه 1.4.0
16 دسامبر 2020
androidx.webkit:webkit:1.4.0
منتشر شد. نسخه 1.4.0 حاوی این commit ها است.
تغییرات عمده از 1.3.0
- یک API
setSafeBrowsingAllowlist()
جدید برای جایگزینیsetSafeBrowsingWhitelist()
اضافه کرد. این به برنامهها کمک میکند تا کد خود را بهروزرسانی کنند تا از اصطلاحات غیرشامل اجتناب کنند، در حالی که همچنان از همان محدوده Android SDK و نسخههای WebView مانند API منسوخ پشتیبانی میکنند. - یک اشکال در setProxyOverride که باعث می شد قوانین بازگشتی به درستی اعمال نشود، رفع شد.
نسخه 1.4.0-rc02
2 دسامبر 2020
androidx.webkit:webkit:1.4.0-rc02
منتشر شد. نسخه 1.4.0-rc02 حاوی این commit ها است.
رفع اشکال
- رفع عدم اعمال صحیح قوانین بازگشتی هنگام استفاده از setProxyOverride.
نسخه 1.4.0-rc01
11 نوامبر 2020
androidx.webkit:webkit:1.4.0-rc01
بدون تغییر از 1.4.0-beta01
منتشر شده است. نسخه 1.4.0-rc01 حاوی این commit ها است.
نسخه 1.4.0-beta01
14 اکتبر 2020
androidx.webkit:webkit:1.4.0-beta01
بدون تغییر از 1.4.0-alpha01
منتشر شده است. نسخه 1.4.0-beta01 حاوی این تعهدات است.
نسخه 1.4.0-alpha01
16 سپتامبر 2020
androidx.webkit:webkit:1.4.0-alpha01
منتشر شد. نسخه 1.4.0-alpha01 حاوی این commit ها است.
تغییرات API
- یک API
WebViewCompat#setSafeBrowsingAllowlist()
اضافه کرد تا جایگزینsetSafeBrowsingWhitelist()
شود. این به برنامهها کمک میکند تا کد خود را بهروزرسانی کنند تا از اصطلاحات غیرشامل اجتناب کنند، در حالی که همچنان از همان محدوده Android SDK و نسخههای WebView مانند API منسوخ پشتیبانی میکنند. ( I8d65d )
نسخه 1.3.0
نسخه 1.3.0
19 آگوست 2020
androidx.webkit:webkit:1.3.0
منتشر شد. نسخه 1.3.0 حاوی این commit ها است.
تغییرات عمده از 1.2.0
- ForceDarkStrategy API کنترل بیشتری برای تاریک شدن WebView (تاریک شدن محتوای CSS/وب در مقابل تاریک شدن خودکار) فراهم می کند.
- WebMessageListener و APIهای مرتبط با آن مکانیسم ساده و ایمنی را برای برقراری ارتباط بین محتوای وب و برنامه WebView embedder فراهم میکنند.
-
isMultiProcessEnabled
API برای بررسی اینکه آیا WebView در چند فرآیند اجرا می شود یا خیر. این کار با شروع در Android O امکان پذیر است و به این معنی است که محتوای وب در یک فرآیند رندر جعبه ایمنی جدا از فرآیند برنامه ارائه می شود. این رندر جعبه ایمنی ممکن است با سایر WebViewها در همان برنامه به اشتراک گذاشته شود، اما با سایر فرآیندهای برنامه به اشتراک گذاشته نشده است.
نسخه 1.3.0-rc02
5 آگوست 2020
androidx.webkit:webkit:1.3.0-rc02
منتشر شد. نسخه 1.3.0-rc02 حاوی این commit ها است.
رفع اشکال
- این مشکل سازگاری را برطرف می کند که در آن
WebMessageListener
گاهی اوقات در حین توسعه محلی خراب می شود اگر برنامه شما با اجرای فوری Android Studio شروع شود.
نسخه 1.3.0-rc01
24 ژوئن 2020
androidx.webkit:webkit:1.3.0-rc01
بدون تغییر از 1.3.0-beta01
منتشر شده است. نسخه 1.3.0-rc01 حاوی این commit ها است.
نسخه 1.3.0-beta01
10 ژوئن 2020
androidx.webkit:webkit:1.3.0-beta01
منتشر شد. نسخه 1.3.0-beta01 حاوی این تعهدات است.
ویژگی های جدید
-
ForceDarkStrategy
API برای کنترل تاریک شدن WebView (تاریک شدن محتوای CSS/وب در مقابل تاریک شدن خودکار). - APIهای
WebMessageListener
یک مکانیسم ساده و امن برای برقراری ارتباط بین محتویات وب و برنامه تعبیهکننده WebView فراهم میکنند. - API
MultiProcessEnabled
برای بررسی اینکه آیا WebView در حالت چند فرآیند کار می کند یا خیر.
نسخه 1.3.0-alpha03
27 مه 2020
androidx.webkit:webkit:1.3.0-alpha03
منتشر شده است. نسخه 1.3.0-alpha03 شامل این تعهدات است.
API تغییر می کند
- روش
addWebMessageListener
اکنونSet<String>
از قوانین منشاء مجاز (قبلاًList<String>
) دریافت می کند.
نسخه 1.3.0-alpha02
29 آوریل 2020
androidx.webkit:webkit:1.3.0-alpha02
منتشر می شود. نسخه 1.3.0-alpha02 شامل این تعهدات است.
ویژگی های جدید
- API چند پردازش شده برای بررسی اینکه آیا WebView در حالت چند فرآیند کار می کند یا خیر.
API تغییر می کند
- تمام ثابت های استراتژی تاریک اکنون با
DARK_STRATEGY
پیشوند هستند.
نسخه 1.3.0-alpha01
15 آوریل 2020
androidx.webkit:webkit:1.3.0-alpha01
منتشر شده است. نسخه 1.3.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- API
ForceDarkStrategy
برای کنترل تاریکیWebView
(CSS/Web Content Darkening در مقابل تاریک شدن خودکار). - API های
WebMessageListener
یک مکانیسم ساده و ایمن برای برقراری ارتباط بین محتوای وب و برنامه تعبیه WebView ارائه می دهند.
نسخه 1.2.0
نسخه 1.2.0
4 مارس 2020
androidx.webkit:webkit:1.2.0
منتشر می شود. نسخه 1.2.0 شامل این تعهدات است.
تغییرات اساسی از 1.1.0
- آیا API Corcedark را برای کنترل در صورت ارائه وب سایت در حالت تاریک اضافه کرد.
نسخه 1.2.0-RC01
19 فوریه 2020
androidx.webkit:webkit:1.2.0-rc01
از 1.2.0-beta01
بدون تغییر منتشر می شود. نسخه 1.2.0-RC01 شامل این تعهدات است.
نسخه 1.2.0-beta01
5 فوریه 2020
androidx.webkit:webkit:1.2.0-beta01
از 1.2.0-alpha01
بدون تغییر منتشر می شود. نسخه 1.2.0-beta01 شامل این تعهدات است .
نسخه 1.2.0-alpha01
18 دسامبر 2019
androidx.webkit:webkit:1.2.0-alpha01
منتشر شده است. نسخه 1.2.0-alpha01 شامل این تعهدات است .
ویژگی های جدید
- API Corcedark را برای کنترل در صورت ارائه وب سایت در حالت تاریک کنترل کنید.
نسخه 1.1.0
نسخه 1.1.0
7 نوامبر 2019
androidx.webkit:webkit:1.1.0
منتشر شده است. نسخه 1.1.0 شامل این تعهدات است .
تغییرات مهم از 1.0.0
- API های Getter برای تکمیل SetWebViewClient () و setWebChromeClient () .
- ProxyController API برای تنظیم پروکسی درخواست شبکه برای وب سایت های برنامه.
- WebViewAssetLoader API برای ساده کردن بارگیری دارایی ها ، منابع و پرونده های APK از فهرست داده های برنامه از طریق رهگیری درخواست. این امکان دسترسی به منابع وب و محلی را بدون غیرفعال کردن COR ها فراهم می کند.
- TracingController API برای جمع آوری اطلاعات ردیابی WebView برای اهداف اشکال زدایی.
- API های RenderProcess برای مدیریت خدمات ارائه دهنده WebView ، و تشخیص اینکه محتوای با رفتار ضعیف باعث می شود وب سایت های وب بی پاسخ نشوند.
- API های موجود را به روز کنید تا شامل Nallability (
@NonNull
،@Nullable
) و Thread (@UiThread
،@WorkerThread
) باشد.
نسخه 1.1.0-RC01
9 اکتبر 2019
androidx.webkit:webkit:1.1.0-rc01
منتشر شده است. نسخه 1.1.0-RC01 شامل این تعهدات است .
رفع اشکال
- مسئله ای را برطرف کرد که در صورت انتقال مشتری تهی ، می تواند
setWebViewRenderProcessClient()
خراب کند.
نسخه 1.1.0-beta01
5 سپتامبر 2019
androidx.webkit:webkit:1.1.0-beta01
منتشر شده است. تعهدات موجود در این نسخه را می توان در اینجا یافت.
ویژگی های جدید
- New
InternalStoragePathHandler
درWebViewAssetLoader
برای بارگیری پرونده ها از فهرست داده های برنامه.
API تغییر می کند
-
ProxyConfig#getProxyRules()
اکنون لیستی غیرقابل تنظیم از نمونه هایProxyRule
را برمی گرداند ، که یک کلاس جدید برای نگه داشتن یک فیلتر طرح و URL پروکسی مربوطه است.
رفع اشکال
-
WebViewAssetLoader
به صورت پیش فرض به نوع "متن/ساده" (به جای تهی) هنگامی که نتواند نوع MIME را از مسیر پرونده حدس بزند. -
WebViewAssetLoader
دیگر هنگام بارگیری پرونده ها با کاراکترهای خاص در نام مسیر خود ،NullPointerException
را پرتاب نمی کند.
نسخه 1.1.0-alpha02
7 آگوست 2019
androidx.webkit:webkit:1.1.0-alpha02
منتشر می شود. تعهدات موجود در این نسخه را می توان در اینجا یافت.
ویژگی های جدید
-
WebViewAssetLoader
رابطPathHandler
در معرض دید قرار می دهد تا برنامه ها بتوانند عملکردهای دستی را ایجاد کنند.
API تغییر می کند
-
WebViewAssetLoader
اکنون یک کلاس نهایی است ، زیرا به معنای زیر طبقه بندی نیست. -
WebViewAssetLoader#PathHandler
اکنون عمومی و نهایی است. - تغییرات جزئی در نام روش ProxyConfig.
-
ProxyController
: روش های جدید اضافه شدهaddDirect()
وaddDirect(String)
برای اتصال مستقیم به سرورها. رشته مستقیم را حذف کرد. - API های موجود را به روز کنید تا شامل Nallability (
@NonNull
،@Nullable
) و Thread (@UiThread
،@WorkerThread
) باشد.
نسخه 1.1.0-alpha01
7 مه 2019
androidx.webkit:webkit:1.1.0-alpha01
منتشر شده است. تعهدات موجود در این نسخه را می توان در اینجا یافت.
ویژگی های جدید
- API های Getter برای تکمیل
setWebViewClient()
وsetWebChromeClient()
- ProxyController API برای تنظیم پروکسی درخواست شبکه برای وب سایت های برنامه.
- AssetLoader API برای ساده کردن بارگیری دارایی ها و منابع APK از طریق رهگیری درخواست ، امکان دسترسی به منابع وب را بدون غیرفعال کردن COR فراهم می کند.
- TracingController API برای جمع آوری اطلاعات ردیابی WebView برای اهداف اشکال زدایی.
- API های RenderProcess برای مدیریت خدمات ارائه دهنده WebView ، و تشخیص اینکه محتوای با رفتار ضعیف باعث می شود وب سایت های وب بی پاسخ نشوند.
رفع اشکال
- اصلاح جزئی در قالب بندی مستندات برای API های موجود.
کیت
آخرین به روز رسانی | انتشار پایدار | نامزد آزادی | نسخه بتا | انتشار آلفا |
---|---|---|---|---|
7 مه 2025 | 1.13.0 | - | 1.14.0-beta01 | - |
اعلام وابستگی ها
برای افزودن وابستگی به WebKit ، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر ، مخزن Maven Google را بخوانید.
وابستگی های مصنوعات مورد نیاز خود را در پرونده build.gradle
برای برنامه یا ماژول خود اضافه کنید:
شیار
dependencies { implementation "androidx.webkit:webkit:1.13.0" }
کاتلین
dependencies { implementation("androidx.webkit:webkit:1.13.0") }
برای کسب اطلاعات بیشتر در مورد وابستگی ها ، به افزودن وابستگی های ساخت مراجعه کنید.
بازخورد
بازخورد شما به بهتر شدن Jetpack کمک می کند. به ما اطلاع دهید که آیا موضوعات جدیدی را کشف کرده اید یا ایده هایی برای بهبود این کتابخانه دارید. لطفاً قبل از ایجاد یک کتاب جدید ، به موضوعات موجود در این کتابخانه نگاهی بیندازید. می توانید با کلیک روی دکمه ستاره ، رای خود را به یک مسئله موجود اضافه کنید.
برای اطلاعات بیشتر به اسناد ردیاب شماره مراجعه کنید.
نسخه 1.14
نسخه 1.14.0-beta01
7 مه 2025
androidx.webkit:webkit:1.14.0-beta01
منتشر شده است. نسخه 1.14.0-BETA01 شامل این تعهدات است.
API تغییر می کند
- زمینه را به عنوان پارامتر به
startUpWebView()
API ( IC29CD ، B/406701301 ) اضافه کنید
نسخه 1.14.0-alpha01
9 آوریل 2025
androidx.webkit:webkit:1.14.0-alpha01
منتشر شده است. نسخه 1.14.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- معرفی API
PaymentRequest
برای فراخوانی برنامه های پرداخت بومی اندرویدی از طریقorg.chromium.intent.action.PAY
.PaymentRequest
به طور پیش فرض غیرفعال است و برنامه های میزبان WebView می توانند باWebSettingsCompat.setPaymentRequestEnabled(settings, true)
تماس بگیرند تا آن را فعال کنند. علاوه بر این ،PaymentRequest
به یک برچسب<queries>
درAndroidManifest.xml
نیاز دارد. برای اطلاعات بیشتر به اسناد مربوط بهsetPaymentRequestEnabled()
مراجعه کنید. ( i3304e ، b/404920055 ) - معرفی تماس های ناوبری تجربی. این نسخه API های تجربی را برای پیگیری و مدیریت پیشرفته ناوبری وب در
WebView
معرفی می کند. این API ها اطلاعات مفصلی در مورد رویدادهای ناوبری ارائه می دهند. ویژگی های کلیدی:- رابط
WebNavigationClient
: یک رابط کاربری جدید ،WebNavigationClient
، با تماس های تماس برای رویدادهای ناوبری معرفی می کند: -
onNavigationStarted(Navigation navigation)
: از زمان شروع ناوبری مطلع می شود. -
onNavigationRedirected(Navigation navigation)
: هنگام هدایت ناوبری ، به شما اطلاع می دهد. -
onNavigationCompleted(Navigation navigation)
: با اتمام ناوبری به شما اطلاع می دهد. - رابط
Navigation
: اطلاعات مفصلی در مورد ناوبری ارائه می دهد ، از جمله: URL ، وضعیت شروع صفحه ، وضعیت همبستگی ، وضعیت بارگیری مجدد ، وضعیت تاریخ ، وضعیت برگشت/رو به جلو ، وضعیت تعهد ، وضعیت صفحه خطا ، کد وضعیت و وضعیت بازیابی جلسه. شیءNavigation
به عنوان یک شناسه منحصر به فرد برای هر ناوبری عمل می کند و به توسعه دهندگان این امکان را می دهد تا با وقایع ناوبری مرتبط ارتباط برقرار کنند. - کلاس
Page
: کلاسPage
را معرفی می کند ، که به عنوان کلید برای داده های مرتبط با صفحه خدمت می کند. ( i351a6 )
- رابط
- یک API آزمایشی جدید را برای تغییر رفتار اشیاء ارائه دهنده ذخیره سازی معرفی کنید. ( I14636 )
API تغییر می کند
- ارزش ویژگی
PROFILE_URL_PREFETCH
درWebViewFeature
به روز کرد. ( i606fd ) -
WebViewCompat#saveState
، شبیه بهWebView#saveState
را اضافه می کند ، اما اجازه می دهد تا اندازه حالت برگشتی را محدود کرده و تصمیم بگیرد که آیا برای صرفه جویی در ورودی های تاریخ به جلو یا خیر. ( IEA7D6 ) - پیکربندی
maxPrerenders
را به APISpeculativeLoadingConfig
اضافه کنید ( I67245 )
نسخه 1.13
نسخه 1.13.0
12 مارس 2025
androidx.webkit:webkit:1.13.0
منتشر شده است. نسخه 1.13.0 شامل این تعهدات است.
تغییرات مهم از 1.12.0
- یک API آزمایشی جدید را برای پیش نویس URL معرفی کنید تا به توسعه دهندگان اجازه دهد URL های نامزد پیش نویس سوداگرانه منجر به ناوبری سریعتر شوند. ( i0cfe7 )
- معرفی مجموعه ای از API های جدید برای حذف داده های مرور ذخیره شده توسط
WebView
. API های جدید درWebStorageCompat
باید نسبت به API های موجود درandroid.webkit.WebStorage
ترجیح داده شوند ، زیرا آنها حذف کلیه ذخیره سازی محلی ، از جمله حافظه نهان شبکه و کوکی ها و همچنین هر کارگران سرویس نصب شده را تضمین می کنند. اگر API های ذخیره سازی جدید در آینده معرفی شوند ، این روش های جدید به روز می شوند تا آنها را در ذخیره سازی حذف شده قرار دهند. ( IAD54F ، B/382273208 ) - API
setPartitionedCookiesEnabled
اضافه کنید. این امر به توسعه دهندگان این امکان را می دهد تا کوکی های پارتیشن شده را درWebView
فعال و غیرفعال کنند. ( IC506A ، B/364904765 ) - برای حسابداری از ترافیک شبکه
WebView
با استفاده ازNetworkStatsManager
/TrafficStats
، API برچسب زدن سوکت را بهWebView
اضافه کنید. این ویژگی فقط ازWebView
M133 در دسترس خواهد بود. ( ICA441 ، b/374932688 ) - API راه اندازی ASYNC
WebView
را اضافه کنید. ( i94b8a ) - پیش نمایش URL در پروفایل: یک API جدید را در
Profile
معرفی کرد تا به توسعه دهندگان اجازه دهد پیش تنظیم URL را تحریک کنند. Prefetch Clearing: یک API را برای پاک کردن پیش نویس های در حال انجام اضافه کرد. ( I42C5C ) -
WebView.startSafeBrowsing
را کاهش دهید. ( IF5626 )
نسخه 1.13.0-RC01
26 فوریه 2025
androidx.webkit:webkit:1.13.0-rc01
منتشر شده است. این نسخه حاوی هیچ تغییری از نسخه 1.13.0-beta01
نیست.
نسخه 1.13.0-beta01
12 فوریه 2025
androidx.webkit:webkit:1.13.0-beta01
منتشر شده است. نسخه 1.13.0-BETA01 شامل این تعهدات است.
API تغییر می کند
- پسوند Async را به API Prerender اضافه کنید. برای بازتاب نام جدید ، هر داده ای را به عنوان در
NoVarySearch
تغییر دهید. ( IE91C9 ) - پارامتر مجری را به API Prerendering URL اضافه کنید. همچنین ، محدود کردن API که فقط از موضوع UI خوانده می شود. ( I50520 )
- یک API را برای پیکربندی پیکربندی حافظه نهان برای درخواست های پیش نمایش پروفایل اضافه کنید. همچنین در مورد درخواست های پیش نویس که از
WebViews
مرتبط با این نمایه آغاز شده است ، صدق می کند. ( IEBB6E )
رفع اشکال
- تغییر رفتار
URLUtilCompat.guessFileName
فقط با استفاده از پارامترmimeType
برای پیشنهاد یک پسوند برای نام های پرونده حاصل از پارامتر URL. ( i53ecd ، b/382864232 )
نسخه 1.13.0-alpha03
15 ژانویه 2025
androidx.webkit:webkit:1.13.0-alpha03
منتشر شده است. نسخه 1.13.0-alpha03 شامل این تعهدات است.
ویژگی های جدید
- یک API آزمایشی جدید را برای پیش نویس URL معرفی کنید تا به توسعه دهندگان اجازه دهد URL های نامزد پیش نویس سوداگرانه منجر به ناوبری سریعتر شوند. ( i0cfe7 )
- معرفی مجموعه ای از API های جدید برای حذف داده های مرور ذخیره شده توسط
WebView
. API های جدید درWebStorageCompat
باید نسبت به API های موجود درandroid.webkit.WebStorage
ترجیح داده شوند ، زیرا آنها حذف کلیه ذخیره سازی محلی ، از جمله حافظه نهان شبکه و کوکی ها و همچنین هر کارگران سرویس نصب شده را تضمین می کنند. اگر API های ذخیره سازی جدید در آینده معرفی شوند ، این روش های جدید به روز می شوند تا آنها را در ذخیره سازی حذف شده قرار دهند. ( IAD54F ، B/382273208 ) - API
setPartitionedCookiesEnabled
اضافه کنید. این امر به توسعه دهندگان این امکان را می دهد تا کوکی های پارتیشن شده را درWebView
فعال و غیرفعال کنند. ( IC506A ، B/364904765 )
API تغییر می کند
- نیاز به موضوع را تغییر دهید تا API prefetch فقط در موضوع UI فراخوانی شود. ( i866b5 )
- روشهای
WebAuthn
به روز کنید تا برجسته شود که باید در موضوع UI فراخوانی شود. این نیاز توسط اجرای قبلاً اجرا می شود و این تغییر فقط حاشیه نویسی مربوطه را اضافه می کند. ( i6d6ba )
نسخه 1.13.0-alpha02
11 دسامبر 2024
androidx.webkit:webkit:1.13.0-alpha02
منتشر شده است. نسخه 1.13.0-alpha02 شامل این تعهدات است.
ویژگی های جدید
- برای حسابداری از ترافیک شبکه
WebView
با استفاده ازNetworkStatsManager
/TrafficStats
، API برچسب زدن سوکت را بهWebView
اضافه کنید. این ویژگی فقط ازWebView
M133 در دسترس خواهد بود. ( ICA441 ، b/374932688 )
API تغییر می کند
- API PREFETCH را با تغییر نام
PrefetchParameter
بهSpeculativeLoadingParamaters
، معرفیPrefetchNetworkException
جدید ، جایگزین کردنPrefetchOperationCallback
باOutcomeReceiverCompat
به روز کنید و Javadoc را به روز کنید. ( IF5072 ) - اطلاعات تشخیصی را از WebView Async Startup API دریافت کنید.
- گزینه ای را برای برنامه ها فراهم کنید تا فقط باعث ابتکار عمل شوند که موضوع UI را مسدود نمی کند. ( i9bf2b )
رفع اشکال
- این کتابخانه در حال حاضر از حاشیه نویسی jspecify nulnness ، که از نوع استفاده هستند استفاده می کند. توسعه دهندگان Kotlin باید از آرگومان کامپایلر زیر برای اجرای صحیح استفاده استفاده کنند:
-Xjspecify-annotations=strict
(این پیش فرض با نسخه 2.1.0 کامپایلر کوتلین شروع می شود). ( I0E4C5 ، B/326456246 )
نسخه 1.13.0-alpha01
13 نوامبر 2024
androidx.webkit:webkit:1.13.0-alpha01
منتشر شده است. نسخه 1.13.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- API راه اندازی ASYNC
WebView
را اضافه کنید. ( i94b8a ) - پیش نمایش URL در پروفایل: یک API جدید را در پروفایل معرفی کرد تا به توسعه دهندگان اجازه دهد پیش تنظیم URL را تحریک کنند. Prefetch Clearing: یک API را برای پاک کردن پیش نویس های مداوم اضافه کرد. ( i42c5c )
API تغییر می کند
-
WebView.startSafeBrowsing
را کاهش دهید. ( IF5626 )
نسخه 1.12
نسخه 1.12.1
2 اکتبر 2024
androidx.webkit:webkit:1.12.1
منتشر شده است. نسخه 1.12.1 شامل این تعهدات است.
رفع اشکال
- مسئله ای را که مانع از دسترسی API های 1.12.0 در نسخه شده است ، حل کنید.
نسخه 1.12.0
18 سپتامبر 2024
androidx.webkit:webkit:1.12.0
منتشر شده است. نسخه 1.12.0 شامل این تعهدات است.
تغییرات مهم از 1.11.0
- برای فعال کردن/غیرفعال کردن BackforwardCache برای این
WebSettings
یک API جدید بهWebSettingsCompat
اضافه کنید. این API تجربی است و در آینده قابل تغییر است. ( AOSP/3111705 ) - برای کنترل رفتار بارگذاری سوداگرانه برای این
WebSettings
، یک API جدید بهWebSettingsCompat
اضافه کنید. اکنون فقط Prerender در دسترس است. این API تجربی است و در آینده قابل تغییر است. ( I13962 ) - یک API جدید برای فعال کردن احراز هویت وب در
WebView
اضافه کرد. توسعه دهندگان می توانند تماس هایWebAuthn
را در یکWebView
برای برنامه های خود با استفاده ازWebSettingsCompat#setWebAuthenticationSupport
فعال یا غیرفعال کنند. ( i8187f )
نسخه 1.12.0-RC01
4 سپتامبر 2024
androidx.webkit:webkit:1.12.0-rc01
منتشر شده است. این نسخه حاوی هیچ تغییری از نسخه 1.12.0-beta01
نیست.
نسخه 1.12.0-beta01
21 آگوست 2024
androidx.webkit:webkit:1.12.0-beta01
منتشر شده است. نسخه 1.12.0-BETA01 شامل این تعهدات است.
رفع اشکال
- حذف دستی دسترسی به دسترسی به API های پلت فرم جدید را حذف کرد زیرا این اتفاق به طور خودکار از طریق مدل سازی API هنگام استفاده از R8 با AGP 7.3 یا بالاتر (به عنوان مثال نسخه R8 3.3) و برای همه ساخت ها هنگام استفاده از AGP 8.1 یا بعد (به عنوان مثال نسخه D8 8.1) اتفاق می افتد. به مشتریانی که از AGP استفاده نمی کنند توصیه می شود نسخه 8.1 یا بعد از آن را به روز کنید. برای جزئیات بیشتر به این مقاله مراجعه کنید. ( IA60E0 ، B/345472586 )
نسخه 1.12.0-alpha02
12 ژوئن 2024
androidx.webkit:webkit:1.12.0-alpha02
منتشر شده است. نسخه 1.12.0-alpha02 شامل این تعهدات است.
ویژگی های جدید
- یک API جدید را به
WebSettingsCompat
اضافه کنید تاBackForwardCache
فعال یا غیرفعال کنید. این API تجربی است و در آینده قابل تغییر است. ( i64a38 ) - برای کنترل رفتار بارگذاری سوداگرانه برای این وب سایت ، یک API جدید به
WebSettingsCompat
اضافه کنید. اکنون فقط Prerender در دسترس است. این API تجربی است و در آینده قابل تغییر است. ( I13962 )
API تغییر می کند
- در حال حاضر برخی از روش ها با
@UiThread
در صورت لزوم ثبت شده اند. ( i6c7e0 ) ، ( i44541 ) - روشهای ایمن موضوع اکنون با
@AnyThread
ثبت شده است. ( I70189 ) - افزایش
minSdkVersion
از 19 تا 21. ( id7a43 )
نسخه 1.12.0-alpha01
17 آوریل 2024
androidx.webkit:webkit:1.12.0-alpha01
منتشر شده است. نسخه 1.12.0-alpha01 شامل این تعهدات است.
API تغییر می کند
- یک API جدید برای فعال کردن احراز هویت وب در
WebView. Developers
می توانند تماس هایWebAuthn
را در یکWebView
برای برنامه های خود با استفاده ازWebSettingsCompat#setWebAuthenticationSupport
فعال یا غیرفعال کنند. ( i8187f )
نسخه 1.11
نسخه 1.11.0
1 مه 2024
androidx.webkit:webkit:1.11.0
منتشر می شود. نسخه 1.11.0 شامل این تعهدات است.
تغییرات مهم از 1.10.0
- به برنامه ها اجازه دهید پخش صوتی را در
WebView
از طریق API های جدیدsetAudioMuted
وisAudioMuted
، که مشابه با جهش یک برگه در Chrome هستند ، کنترل کنند. -
URLUtilCompat
معرفی شده ، که از تجزیه هدرهایContent-Disposition
پشتیبانی می کند که از ویژگی رمزگذاری شدهfilename*
استفاده می کنند ، همانطور که در RFC 6266 تعریف شده است. API سازگاری همچنین به طور مستقیم روشی را برای جدا کردن هدرContent-Disposition
در جایی که یک نام پرونده پیشنهادی بر اساس URL و نوع MIME مورد نظر نیست ، در معرض دید قرار می دهد.
نسخه 1.11.0-RC01
3 آوریل 2024
androidx.webkit:webkit:1.11.0-rc01
منتشر شده است. این نسخه حاوی هیچ تغییری از نسخه 1.11.0-beta01
نیست.
نسخه 1.11.0-beta01
20 مارس 2024
androidx.webkit:webkit:1.11.0-beta01
بدون هیچ گونه تغییر قابل توجهی منتشر می شود. نسخه 1.11.0-beta01 شامل این تعهدات است.
نسخه 1.11.0-alpha02
21 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha02
منتشر می شود. نسخه 1.11.0-alpha02 شامل این تعهدات است.
ویژگی های جدید
- روشهای
setAudioMuted
وisAudioMuted
را برای دیدنWebViews
جهش یافته (و بدون استفاده) اضافه کنید. این روش به شما امکان می دهد از پخشWebView
جلوگیری کنید. ( IE7A33 )
API تغییر می کند
-
URLUtilCompat
نهایی می شود زیرا نباید زیر طبقه بندی شود. ( i49ec1 )
نسخه 1.11.0-alpha01
7 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha01
منتشر شده است. نسخه 1.11.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- سازگاری را برای
URLUtil.guessFileName
اضافه کنید. نسخه سازگاری درURLUtilCompat
از تجزیه هدرهایContent-Disposition
که از ویژگی مقدار رمزگذاری شدهfilename*
استفاده می کنند ، همانطور که در RFC 6266 تعریف شده است ، پشتیبانی می کند. API سازگاری همچنین به طور مستقیم روشی را برای جدا کردن هدرContent-Disposition
در جایی که یک نام پرونده پیشنهادی بر اساس URL و نوع MIME مورد نظر نیست ، در معرض دید قرار می دهد. ( IF6AE7 ، B/309927164 )
نسخه 1.10
نسخه 1.10.0
24 ژانویه 2024
androidx.webkit:webkit:1.10.0
منتشر می شود. نسخه 1.10.0 شامل این تعهدات است.
تغییرات مهم از 1.9.0
- یک API جدید به WebSettingsCompat برای کنترل رفتار API یکپارچگی رسانه ای Android WebView با غیرفعال کردن API به طور کامل ، یا محدود کردن به اشتراک گذاری هویت برنامه در پاسخ API اضافه کرد. این را می توان برای همه منشاء و بر اساس هر مبدأ تغییر داد.
نسخه 1.10.0-RC01
10 ژانویه 2024
androidx.webkit:webkit:1.10.0-rc01
منتشر شده است. این نسخه حاوی هیچ تغییری از نسخه 1.10.0-beta01
نیست.
نسخه 1.10.0-beta01
13 دسامبر 2023
androidx.webkit:webkit:1.10.0-beta01
منتشر شده است. نسخه 1.10.0-beta01 شامل این تعهدات است.
- بدون تغییر عملکردی از
1.10.0-alpha01
.
نسخه 1.10.0-alpha01
29 نوامبر 2023
androidx.webkit:webkit:1.10.0-alpha01
منتشر شده است. نسخه 1.10.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- یک API جدید به
WebSettingsCompat
برای کنترل رفتار API یکپارچگی رسانه ای Android WebView با غیرفعال کردن API به طور کامل ، یا محدود کردن به اشتراک گذاری هویت برنامه در پاسخ API اضافه کرد. این را می توان برای همه منشاء و بر اساس هر مبدأ تغییر داد.
نسخه 1.9
نسخه 1.9.0
29 نوامبر 2023
androidx.webkit:webkit:1.9.0
منتشر شده است. نسخه 1.9.0 شامل این تعهدات است.
تغییرات مهم از 1.8.0
- یک API جدید چند منظوره برای WebViews اضافه کرد.
- رابط پروفایل دارای API های مختلفی برای استفاده از داده های مرتبط با این نمایه مانند نام آن ، GeolocationPermissions ، ServiceWorkerController ، Cookiemanager و WebStorage است. این اشیاء مختص پروفایل هستند و اطلاعات بین پروفایل های مختلف در برنامه به اشتراک گذاشته نمی شود.
- نمایه مورد استفاده در یک نمونه
WebView
را می توان با استفاده از روش WebViewCompat#SetProfile تغییر داد و با استفاده از WebViewCompat#GetProfile بازیابی شد - Profilestore که به تازگی معرفی شده است به شما امکان می دهد پروفایل های موجود را در برنامه خود از جمله مشخصات پیش فرض مدیریت کنید.
- API های WebView موجود مانند CookiEmanager#GetInstance همچنان در پروفایل پیش فرض فعالیت خواهد کرد.
- قبل از بار صفحه ، یک API برای تزریق و اجرای JavaScript اضافه کرد.
- WebViewCompat#AddDocumentStartJavAscript API به برنامه ها اجازه می دهد تا اسکریپت ها را به یک
WebView
تزریق کنند که قبل از اجرای اسکریپت های صفحه ای اجرا می شود. API به برنامه اجازه می دهد تا یک لیست هدف از ریشه ها را برای فعال کردن اسکریپت مشخص کند و اطمینان حاصل کند که فقط در صفحات مورد نظر اجرا می شود. بر خلاف WebView#ارزیابی JavAscript ، این API اجازه می دهد تا هنگام بارگیری ، اسکریپت ها را در iframes تعبیه شده انجام دهد. برنامه ها می توانند از این API جدید در ترکیب با WebViewCompat#addWebMessageListener استفاده کنند تا ارتباط دو طرفه با JavaScript را در صفحه به روشی قابل اعتماد برقرار کنند.
- WebViewCompat#AddDocumentStartJavAscript API به برنامه ها اجازه می دهد تا اسکریپت ها را به یک
- API های اضافه شده برای تغییر نحوه ثبت وقایع گزارش انتساب ماسهبازی حریم خصوصی.
- ما یک API WebSettingsCompat#SetAttributionReferregistrationBehavior را معرفی کردیم که به توسعه دهندگان این امکان را می دهد تا پیکربندی کنند که آیا منابع و محرک های انتساب به عنوان خود برنامه ثبت شده اند یا از محتوای وب در وب سایت خارج می شوند. این روش همچنین می تواند برای غیرفعال کردن گزارش انتساب در WebView استفاده شود. علاوه بر این ، ما یک API
WebSettingsCompat#getAttributionRegistrationBehavior
را اضافه کردیم تا رفتار فعلی را بدست آوریم. - برای اطلاعات بیشتر به مستندات Sandbox حریم خصوصی مراجعه کنید.
- ما یک API WebSettingsCompat#SetAttributionReferregistrationBehavior را معرفی کردیم که به توسعه دهندگان این امکان را می دهد تا پیکربندی کنند که آیا منابع و محرک های انتساب به عنوان خود برنامه ثبت شده اند یا از محتوای وب در وب سایت خارج می شوند. این روش همچنین می تواند برای غیرفعال کردن گزارش انتساب در WebView استفاده شود. علاوه بر این ، ما یک API
- API ها را برای نادیده گرفتن ابرداده کاربر-عامل برای نکات مشتری اضافه کرد.
- ما یک API جدید ، WebSettingsCompat#SetUseragentMetadata را معرفی کردیم تا از ابرداده کاربر-عامل برای WebView استفاده شود که برای جمع آوری نکات مشتری کاربری مورد استفاده قرار می گیرد ، و همچنین یک API WebSettingsCompat#GetUserAgentMetadata را نیز اضافه کردیم تا بیش از حد کاربر را بدست آوریم. ما برنامه ها را ترغیب می کنیم تا از API جدید استفاده کنند تا مقادیر غلبه بر راست را تنظیم کنند هر زمان که برنامه رشته عامل پیش فرض کاربر را با استفاده از WebSettings.SetUserAgentString تغییر دهد تا اطمینان حاصل شود که از مقادیر صحیح در همه شرایط استفاده می شود.
نسخه 1.9.0-RC01
15 نوامبر 2023
androidx.webkit:webkit:1.9.0-rc01
منتشر شده است. این نسخه حاوی هیچ تغییری از نسخه 1.9.0-beta01
نیست.
نسخه 1.9.0-beta01
1 نوامبر 2023
androidx.webkit:webkit:1.9.0-beta01
منتشر شده است. نسخه 1.9.0-BETA01 شامل این تعهدات است.
API تغییر می کند
- آدرس تهوع قابلیت ابرداده API API کاربر را آدرس دهید. ما کلاس
BrandVersion
به روز می کنیم تا از الگوی سازنده استفاده کنیم ، دریافت کننده ها و تنظیم کننده های کلاسUserAgentMetadata
را به طور مداوم سازگار کنیم. ( IBF195 ) - حاشیه نویسی
ProfileStore
،WebViewCompat#setProfile
وWebViewCompat.getProfile
با@UiThread
. ( i499b2 )
نسخه 1.9.0-alpha01
18 اکتبر 2023
androidx.webkit:webkit:1.9.0-alpha01
منتشر شده است. نسخه 1.9.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- ما API چند منظوره را اضافه کردیم که به شما امکان می دهد جلسات مرور جداگانه ای بین
WebViews
داشته باشید ، هر پروفایل داده های خاص خود را دارد (به عنوان مثال کوکی ها). می توانید پروفایل ایجاد کنید ، آنها را به مواردWebView
اختصاص دهید و بعداً آنها را برای دسترسی به داده ها بازیابی کنید. یکProfileStore
کلاس Singleton برای کمک به شما در مدیریت پروفایل ها با ایجاد یا حذف با API وجود دارد.getOrCreateProfile
،getProfile
،getAllProfileNames
وdeleteProfile
. کلاسProfile
دارای API های مختلفی برای استفاده از داده های مرتبط با این نمایه مانند نام آن ،GeoLocationPermissions
،ServiceWorkerController
،CookieManager
وWebStorage
خواهد بود. هرWebView
با مشخصات پیش فرض به طور پیش فرض اجرا می شود ، با این حال ، می توانید با استفاده ازWebViewCompat#setProfile
مربوط به آن ، تغییر دهید ، نمایهWebView
می توان با استفاده ازWebViewCompat#getProfile
بازیابی کرد. ( i32d22 ) - API ها را برای تغییر نحوه ثبت وقایع گزارش انتساب اضافه کنید. ما یک API
WebSettingsCompat#setAttributionRegistrationBehavior
معرفی کردیم که به توسعه دهندگان این امکان را می دهد تا پیکربندی کنند که آیا منابع و محرک ها به عنوان خود برنامه ثبت شده اند یا از محتوای وب درWebView
خارج می شوند. این روش همچنین می تواند برای غیرفعال کردن گزارش انتساب درWebView
استفاده شود. علاوه بر این ، ما یک APIWebSettingsCompat#getAttributionRegistrationBehavior
را اضافه کردیم تا رفتار فعلی را بدست آوریم. برای اطلاعات بیشتر به مستندات Sandbox حریم خصوصی مراجعه کنید. ( i661f2 ) - API ها را برای غلبه بر ابرداده کاربر-عامل اضافه کنید. ما یک API
WebSettingsCompat#setUserAgentMetadata
معرفی کردیم تا ابرداده کاربر-عامل را برای WebView نادیده بگیریم ، که برای جمع آوری نکات مشتری کاربر استفاده می شود ، و همچنین یکWebSettingsCompat#getUserAgentMetadata
برای به دست آوردن بیش از حد کاربر فعلی. ما برنامه ها را ترغیب می کنیم تا از API جدید استفاده کنند تا به جای تکیه بر تغییر عامل کاربر ، مقادیر نادیده گرفته شده را تنظیم کنند. ( I74500 ) - برای تزریق جاوا اسکریپت یک API اضافه کنید تا در هنگام بار صفحه اجرا شود. API
WebViewCompat.addDocumentStartJavascript
API به برنامه ها اجازه می دهد تا اسکریپت ها را به یک وب سایت تزریق کنند که قبل از اجرای هر اسکریپت های صفحه اجرا می شود. API به برنامه اجازه می دهد تا یک لیست هدف از ریشه ها را برای فعال کردن اسکریپت مشخص کند و اطمینان حاصل کند که فقط در صفحات مورد نظر اجرا می شود. بر خلافWebView.evaluateJavascript
، این API امکان اجرای اسکریپت ها را در iframes تعبیه شده در هنگام بارگیری فراهم می کند. ( IDE063 )
نسخه 1.8
نسخه 1.8.0
6 سپتامبر 2023
androidx.webkit:webkit:1.8.0
منتشر می شود. نسخه 1.8.0 شامل این تعهدات است.
تغییرات مهم از 1.7.0
- اضافه کردن پشتیبانی از
ArrayBuffer
از طریقWebMessagePortCompat#postMessage
،JavaScriptReplyProxy#postMessage
andWebViewCompat#postWebMessage
، دریافتArrayBuffer
از طریقWebMessagePortCompat
وWebMessageListener
، و دریافت Arraybuffer transferableArrayBuffer
قابل انتقالWebMessagePortCompat
. ( AOSP/2596550 ، B/251152171 )
نسخه 1.8.0-RC01
9 آگوست 2023
androidx.webkit:webkit:1.8.0-rc01
از 1.8.0-beta01
بدون تغییر منتشر می شود. نسخه 1.8.0-RC01 شامل این تعهدات است.
نسخه 1.8.0-beta01
26 جولای 2023
androidx.webkit:webkit:1.8.0-beta01
از 1.8.0-alpha01
بدون تغییر منتشر می شود. نسخه 1.8.0-beta01 شامل این تعهدات است.
نسخه 1.8.0-alpha01
7 ژوئن 2023
androidx.webkit:webkit:1.8.0-alpha01
منتشر شده است. نسخه 1.8.0-alpha01 شامل این تعهدات است.
API تغییر می کند
- به بخش مشارکت خارجی مراجعه کنید.
سهم خارجی
- پشتیبانی از
ArrayBuffer
را از طریقWebMessagePortCompat#postMessage
،JsReplyProxy#postMessage
وWebViewCompat#postWebMessage
، دریافتArrayBuffer
ازWebMessagePortCompat
وWebMessageListener
، و دریافتArrayBuffer
قابل انتقال از Javraybuffer قابل انتقال ازWebMessagePortCompat
انتقال . لطفاً توجه داشته باشید که این API فقط ازWebView
نسخه 116 در دسترس خواهد بود. ( IE7567 ، B/251152171 )
نسخه 1.7
نسخه 1.7.0
24 مه 2023
androidx.webkit:webkit:1.7.0
منتشر شده است. نسخه 1.7.0 شامل این تعهدات است.
تغییرات مهم از 1.6.0
- ما پشتیبانی را برای کشیدن تصویر در
WebView
اضافه کردیم. شما می توانید کاربران خود را فعال کنید تا با افزودنDropDataContentProvider
جدید به مانیفست برنامه خود ، همانطور که در مستندات کلاس شرح داده شده است ، تصاویر را از طریقWebView
خارج کنند. - ما API
ProcessGlobalConfig#setDirectoryBasePaths(Context,File,File)
را اضافه کردیم که می تواند برای تنظیم دایرکتوری های پایه کهWebView
برای فرآیند فعلی استفاده می کند ، استفاده شود. مانند تمام روشهای موجود درProcessGlobalConfig
، این روش باید قبل از اینکه اولین نمونه ازWebView
فوری شود ، فراخوانی شود. این روش برای ارائه چارچوب Android امکان تنظیم تنظیماتWebView
اضافه شده است. برای برنامه های کاربردی کلی ، استفاده از این روش توصیه نمی شود.
نسخه 1.7.0-RC01
10 مه 2023
androidx.webkit:webkit:1.7.0-rc01
از 1.7.0-beta01
بدون تغییر منتشر می شود. نسخه 1.7.0-RC01 شامل این تعهدات است.
نسخه 1.7.0-beta01
5 آوریل 2023
androidx.webkit:webkit:1.7.0-beta01
منتشر شده است. نسخه 1.7.0-beta01 شامل این تعهدات است.
API تغییر می کند
- تغییر جزئی در ویژگی پرچم و نام روش و ایجاد
setDirectoryBasePaths()
پرونده را به جای رشته ( IB0D0A ) قبول کنید
نسخه 1.7.0-alpha03
8 مارس 2023
androidx.webkit:webkit:1.7.0-alpha03
منتشر شده است. نسخه 1.7.0-alpha03 شامل این تعهدات است.
API تغییر می کند
- API
ProcessGlobalConfig#setDirectoryBasePath(String, String)
را اضافه کنید که می تواند برای تنظیم دایرکتوری های پایه ای کهWebView
برای فرآیند فعلی استفاده می کند ، استفاده شود. ( IBD1A1 ، B/250553687 )
رفع اشکال
- رفع قانون
ProGuard
نامعتبر ایجاد خطاهای ساخت در هنگام استفادهDexGuard
( IA65C2 ، B/270034835 )
نسخه 1.7.0-alpha02
8 فوریه 2023
androidx.webkit:webkit:1.7.0-alpha02
منتشر شده است. نسخه 1.7.0-alpha02 شامل این تعهدات است.
رفع اشکال
- اشکالات مستندات برای
DropDataContentProvider
.
نسخه 1.7.0-alpha01
25 ژانویه 2023
androidx.webkit:webkit:1.7.0-alpha01
منتشر شده است. نسخه 1.7.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- ما در حال اضافه کردن پشتیبانی برای کشیدن تصویر در
WebView
هستیم. شما می توانید کاربران خود را فعال کنید تا با افزودنDropDataContentProvider
جدید به مانیفست برنامه خود ، تصاویر را از طریق وب از طریقWebView
بیرون بکشید. ( 05A1A6 )
نسخه 1.6
نسخه 1.6.1
22 مارس 2023
androidx.webkit:webkit:1.6.1
منتشر شده است. نسخه 1.6.1 شامل این تعهدات است.
رفع اشکال
- رفع خطای پارس Proguard ( IA65C2 )
نسخه 1.6.0
25 ژانویه 2023
androidx.webkit:webkit:1.6.0
منتشر شده است. نسخه 1.6.0 شامل این تعهدات است.
تغییرات مهم از 1.5.0
- یک API جدید ProcessGlobalConfig اضافه شده است تا برنامه ها تنظیمات پیکربندی را که باید قبل از بارگیری WebView تنظیم شوند ، مانند پسوند دایرکتوری داده های WebView ارائه دهند. پیکربندی باید در اسرع وقت در هنگام راه اندازی برنامه تنظیم و اعمال شود تا اطمینان حاصل شود که قبل از اینکه هر موضوع دیگری بتواند روشی را که
WebView
در این فرآیند بارگیری می کند ، تنظیم و استفاده کند. - یک API جدید CookiemanagerCompat برای گسترش Android.webkit.cookiemanager با یک روش جدید
getCookieInfo
اضافه شده است ، که تمام ویژگی های همه کوکی ها را که روی یک آدرس خاص تنظیم شده است ، بازیابی می کند. این متفاوت از API موجود در GetCookie درCookieManager
است که فقط نام و ویژگی های ارزش کوکی ها را برمی گرداند. -
WebSettingsCompat
روشهای جدیدی برای فعال کردن/غیرفعال کردن تأثیر شرکتEnterpriseAuthenticationAppLinkPolicy
در صورت تنظیم توسط Admin درWebView
و به دست آوردن تنظیمات فعلی دارد. این ویژگی به WebView اجازه می دهد تا به جای باز کردن URL تأیید اعتبار ، یک برنامه تأیید اعتبار را باز کند. این ویژگی هیچ تاثیری در دستگاه هایی ندارد که توسط یک سیاست سازمانی اداره نمی شوند. - اضافه کردن یک API جدید به
WebSettingsCompat
برای اجازه دادن به برنامه ها به صراحت نام بسته برنامه را در عنوانX-Requested-With
به منشأ اجازه داده شده ارسال کنید. این هدر به طور سنتی در هر درخواست ازWebView
ارسال شده است.
نسخه 1.6.0-RC01
11 ژانویه 2023
androidx.webkit:webkit:1.6.0-rc01
منتشر شده است. نسخه 1.6.0-RC01 شامل این تعهدات است.
رفع اشکال
- ثابت
NullPointerException
درWebViewFeature.isStartupFeatureSupported(Context, String)
هنگام اجرای SDK <L. ( IC7292 )
نسخه 1.6.0-beta01
7 دسامبر 2022
androidx.webkit:webkit:1.6.0-beta01
منتشر شده است. نسخه 1.6.0-beta01 شامل این تعهدات است.
API تغییر می کند
-
ProcessGlobalConfig
برای استفاده از یک سازنده عادی و یک روش اعمال استاتیک تغییر یافته است. روش اعمال فقط باید در هر فرآیند ، در اسرع وقت خوانده شود و در صورت فراخوانی بیش از یک بار ،IllegalStateException
است. اشیاءProcessGlobalConfig
دیگر محدودیتی در مورد چند بار می توان تنظیم کننده ها نامیدند. ( i456c3 )
نسخه 1.6.0-alpha03
9 نوامبر 2022
androidx.webkit:webkit:1.6.0-alpha03
منتشر شده است. نسخه 1.6.0-alpha03 شامل این تعهدات است.
ویژگی های جدید
- کلاس
ProcessGlobalConfig
را اضافه کنید و کاربران را قادر می سازد قبل از بارگیریWebView
پیکربندی جهانی را تنظیم کنند.WebView
دارای برخی از پارامترهای پیکربندی فرآیند جهانی است که پس از بارگیریWebView
قابل تغییر نیست (به عنوان مثال فهرست داده هایWebView
). این کلاس به برنامه ها اجازه می دهد تا این پارامترها را تنظیم کنند. پیکربندی باید در اسرع وقت در هنگام راه اندازی برنامه تنظیم و اعمال شود تا اطمینان حاصل شود که قبل از اینکه هر موضوع دیگری بتواند روشی را کهWebView
در این فرآیند بارگیری می کند ، تنظیم و استفاده کند. ( I7C0E0 ، B/250553687 ) - افزودن API جدید برای اجازه دادن به برنامه ها به صراحت نام بسته برنامه را در عنوان X-requested-with به منشأ اجازه داده شده ارسال می کند. این هدر به طور سنتی در هر درخواست از
WebView
ارسال شده است. ( i0adfe ، b/226552535 )
API تغییر می کند
- API
WebSettingsCompat#setAlgorithmicDarkeningAllowed
API در تمام نسخه های Android درWebView
نسخه 105 و بعد از آن پشتیبانی می شود. نسخه های قبلیWebView
فقط از API در Android Q و بعد پشتیبانی می کرد. در نتیجه ، این API دیگر مشخص نشده است@RequiresApi(Build.VERSION_CODES.Q)
. ( i3ac1d )
نسخه 1.6.0-alpha02
24 اکتبر 2022
androidx.webkit:webkit:1.6.0-alpha02
منتشر شده است. نسخه 1.6.0-alpha02 شامل این تعهدات است.
ویژگی های جدید
- یک کلاس جدید
CookieManagerCompat
را به همراه یک APIgetCookieInfo
اضافه می کند که تمام ویژگی های همه کوکی ها را که روی یک URL خاص تنظیم شده است ، بازیابی می کند. این متفاوت از API موجود درgetCookie
درCookieManager
است که فقط نام و ویژگی های ارزش کوکی ها را برمی گرداند. ( I07365 ، b/242161756 )
نسخه 1.6.0-alpha01
24 آگوست 2022
androidx.webkit:webkit:1.6.0-alpha01
منتشر شده است. نسخه 1.6.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- API های اضافه شده در
WebSettingsCompat
برای فعال کردن/غیرفعال کردن تأثیرEnterpriseAuthenticationAppLinkPolicy
در صورت تنظیم توسط Admin درWebView
. این ویژگی بهWebView
اجازه می دهد تا به جای باز کردن URL تأیید اعتبار ، یک برنامه تأیید اعتبار را باز کند. This feature has no effect on devices that are not managed by an enterprise policy.
نسخه 1.5.0
نسخه 1.5.0
24 آگوست 2022
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 onWebSettingsCompat
replaces the oldsetForceDark
andsetForceDarkStrategy
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 settingsetReverseBypassEnabled
totrue
. When this is in effect, all other URLs will bypass the configured proxy.
Version 1.5.0-rc01
10 آگوست 2022
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
29 ژوئن 2022
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
18 مه 2022
androidx.webkit:webkit:1.5.0-alpha01
is released. Version 1.5.0-alpha01 contains these commits.
ویژگی های جدید
- Add a new
getVariationsHeader()
method onWebViewCompat
to get the X-Client-Data header value sent by theWebView
. 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 )
نسخه 1.4.0
نسخه 1.4.0
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 replacesetSafeBrowsingWhitelist()
. 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
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
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
14 اکتبر 2020
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
16 سپتامبر 2020
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 replacesetSafeBrowsingWhitelist()
. 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 )
نسخه 1.3.0
نسخه 1.3.0
19 آگوست 2020
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
5 آگوست 2020
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
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
10 ژوئن 2020
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
27 مه 2020
androidx.webkit:webkit:1.3.0-alpha03
is released. Version 1.3.0-alpha03 contains these commits.
API Changes
-
addWebMessageListener
method now receives aSet<String>
of allowed origin rules (previously aList<String>
).
Version 1.3.0-alpha02
29 آوریل 2020
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
15 آوریل 2020
androidx.webkit:webkit:1.3.0-alpha01
is released. Version 1.3.0-alpha01 contains these commits.
ویژگی های جدید
-
ForceDarkStrategy
API to controlWebView
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.
نسخه 1.2.0
نسخه 1.2.0
4 مارس 2020
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
February 19, 2020
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
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
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.
نسخه 1.1.0
نسخه 1.1.0
7 نوامبر 2019
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
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
5 سپتامبر 2019
androidx.webkit:webkit:1.1.0-beta01
is released. The commits included in this version can be found here .
ویژگی های جدید
- New
InternalStoragePathHandler
inWebViewAssetLoader
to load files from the app's data directory.
API changes
-
ProxyConfig#getProxyRules()
now returns an unmodifiable list ofProxyRule
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 aNullPointerException
when loading files with special characters in their path names.
Version 1.1.0-alpha02
7 آگوست 2019
androidx.webkit:webkit:1.1.0-alpha02
is released. The commits included in this version can be found here .
ویژگی های جدید
-
WebViewAssetLoader
exposes thePathHandler
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 methodsaddDirect()
andaddDirect(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
7 مه 2019
androidx.webkit:webkit:1.1.0-alpha01
is released. The commits included in this version can be found here .
ویژگی های جدید
- Getter APIs to complement
setWebViewClient()
andsetWebChromeClient()
- 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
آخرین به روز رسانی | Stable Release | Release Candidate | نسخه بتا | Alpha Release |
---|---|---|---|---|
7 مه 2025 | 1.13.0 | - | 1.14.0-beta01 | - |
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.13.0" }
کاتلین
dependencies { implementation("androidx.webkit:webkit:1.13.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.
See the Issue Tracker documentation for more information.
نسخه 1.14
Version 1.14.0-beta01
7 مه 2025
androidx.webkit:webkit:1.14.0-beta01
is released. Version 1.14.0-beta01 contains these commits .
API Changes
- Add context as parameter to
startUpWebView()
API ( Ic29cd , b/406701301 )
Version 1.14.0-alpha01
9 آوریل 2025
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 throughorg.chromium.intent.action.PAY
intent.PaymentRequest
is disabled by default and WebView host apps can callWebSettingsCompat.setPaymentRequestEnabled(settings, true)
to enable it. In addition,PaymentRequest
requires a<queries>
tag inAndroidManifest.xml
. See documentation forsetPaymentRequestEnabled()
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. ویژگی های کلیدی:-
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. TheNavigation
object serves as a unique identifier for each navigation, allowing developers to correlate related navigation events. -
Page
class: Introduces thePage
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 inWebViewFeature
. ( I606fd ) - Adds
WebViewCompat#saveState
, akin toWebView#saveState
, but allows restricting the size of the returned state and deciding whether or not to save forward history entries. ( Iea7d6 ) - Add
maxPrerenders
config toSpeculativeLoadingConfig
API ( I67245 )
نسخه 1.13
Version 1.13.0
12 مارس 2025
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 inWebStorageCompat
should be preferred over the existing APIs inandroid.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 inWebView
. ( Ic506a , b/364904765 ) - Add socket tagging API to
WebView
for accounting ofWebView
's network traffic usingNetworkStatsManager
/TrafficStats
. This feature will only be available fromWebView
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
26 فوریه 2025
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
12 فوریه 2025
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 themimeType
parameter to suggest an extension for filenames derived from the URL parameter. ( I53ecd , b/382864232 )
Version 1.13.0-alpha03
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 inWebStorageCompat
should be preferred over the existing APIs inandroid.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 inWebView
. ( 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
11 دسامبر 2024
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 ofWebView
's network traffic usingNetworkStatsManager
/TrafficStats
. This feature will only be available fromWebView
M133. ( Ica441 , b/374932688 )
API Changes
- Update Prefetch API by renaming
PrefetchParameter
toSpeculativeLoadingParamaters
, introducing newPrefetchNetworkException
, replacingPrefetchOperationCallback
withOutcomeReceiverCompat
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
13 نوامبر 2024
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 )
نسخه 1.12
نسخه 1.12.1
2 اکتبر 2024
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
18 سپتامبر 2024
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 thisWebSettings
. 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 thisWebSettings
. 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/disableWebAuthn
calls in aWebView
for their apps usingWebSettingsCompat#setWebAuthenticationSupport
. ( I8187f )
Version 1.12.0-rc01
4 سپتامبر 2024
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
21 آگوست 2024
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. برای جزئیات بیشتر به این مقاله مراجعه کنید. ( Ia60e0 , b/345472586 )
Version 1.12.0-alpha02
12 ژوئن 2024
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/disableBackForwardCache
. 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
17 آوریل 2024
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/disableWebAuthn
calls in aWebView
for their apps usingWebSettingsCompat#setWebAuthenticationSupport
. ( I8187f )
نسخه 1.11
نسخه 1.11.0
1 مه 2024
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 newsetAudioMuted
andisAudioMuted
APIs, which are analogous to muting a tab in Chrome. - Introduced
URLUtilCompat
, which supports parsing ofContent-Disposition
headers that use thefilename*
encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse theContent-Disposition
header where a suggested file name based on URL and MIME-type is not desired.
Version 1.11.0-rc01
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
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
21 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha02
is released. Version 1.11.0-alpha02 contains these commits.
ویژگی های جدید
- Add
setAudioMuted
andisAudioMuted
methods for muting (and unmuting)WebViews
. This method will allow you to prevent aWebView
from playing audio. ( Ie7a33 )
API Changes
-
URLUtilCompat
is made final as it should not be subclassed. ( I49ec1 )
Version 1.11.0-alpha01
7 فوریه 2024
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 inURLUtilCompat
supports parsing ofContent-Disposition
headers that use thefilename*
encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse theContent-Disposition
header where a suggested file name based on URL and MIME-type is not desired. ( If6ae7 , b/309927164 )
نسخه 1.10
نسخه 1.10.0
24 ژانویه 2024
androidx.webkit:webkit:1.10.0
is released. Version 1.10.0 contains these commits.
Important changes since 1.9.0
- Added a new API to WebSettingsCompat to control the experimental Android WebView Media Integrity API behavior 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.10.0-rc01
10 ژانویه 2024
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
13 دسامبر 2023
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
29 نوامبر 2023
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.
نسخه 1.9
نسخه 1.9.0
29 نوامبر 2023
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.
- The Profile interface has different APIs to use to get associated data with this profile such as its name, GeoLocationPermissions , ServiceWorkerController , CookieManager and WebStorage . These objects are specific to the profile, and information is not shared between different profiles in the application.
- The profile used by a
WebView
instance can be changed using the WebViewCompat#setProfile method and retrieved using WebViewCompat#getProfile - The newly introduced ProfileStore let you manage the available profiles in your application, including the default profile.
- Existing WebView APIs such as CookieManager#getInstance will continue to operate on the Default profile.
- 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.
- The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a
- 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 .
- 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
- Added APIs to override user-agent metadata for client hints.
- We introduced a new API, WebSettingsCompat#setUserAgentMetadata to override the user-agent metadata for WebView 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 whenever the app changes the default user agent string using WebSettings.setUserAgentString to ensure the correct values are being used in all situations.
Version 1.9.0-rc01
15 نوامبر 2023
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 theUserAgentMetadata
class's getters and setters nullability consistent. ( Ibf195 ) - Annotating
ProfileStore
,WebViewCompat#setProfile
andWebViewCompat.getProfile
with@UiThread
. ( I499b2 )
Version 1.9.0-alpha01
18 اکتبر 2023
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 toWebView
instances, and retrieve them later for any data access. There is a singleton classProfileStore
to help you manage profiles by creation or deletion with APIs;getOrCreateProfile
,getProfile
,getAllProfileNames
anddeleteProfile
. TheProfile
class will have different APIs to use to get associated data with this profile such as its name,GeoLocationPermissions
,ServiceWorkerController
,CookieManager
andWebStorage
. EachWebView
will run with the default profile by default however, you can change that usingWebViewCompat#setProfile
Related to that, aWebView
's profile can be retrieved usingWebViewCompat#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 theWebView
. This method can also be used to disable Attribution Reporting inWebView
. Additionally we added a new APIWebSettingsCompat#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 APIWebSettingsCompat#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. UnlikeWebView.evaluateJavascript
, this API will allow execution of scripts in embedded Iframes when they load. ( Ide063 )
نسخه 1.8
نسخه 1.8.0
6 سپتامبر 2023
androidx.webkit:webkit:1.8.0
is released. Version 1.8.0 contains these commits.
Important changes since 1.7.0
- Add support for passing
ArrayBuffer
overWebMessagePortCompat#postMessage
,JavaScriptReplyProxy#postMessage
andWebViewCompat#postWebMessage
, receivingArrayBuffer
from JavaScript overWebMessagePortCompat
andWebMessageListener
, and receiving transferableArrayBuffer
from JavaScript overWebMessagePortCompat
. ( aosp/2596550 , b/251152171 )
Version 1.8.0-rc01
9 آگوست 2023
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
26 جولای 2023
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
7 ژوئن 2023
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
overWebMessagePortCompat#postMessage
,JsReplyProxy#postMessage
andWebViewCompat#postWebMessage
, receivingArrayBuffer
from JavaScript overWebMessagePortCompat
andWebMessageListener
, and receiving transferableArrayBuffer
from JavaScript overWebMessagePortCompat
. Please note that this API will only be available fromWebView
version 116. ( Ie7567 , b/251152171 )
نسخه 1.7
نسخه 1.7.0
24 مه 2023
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 theWebView
by adding the newDropDataContentProvider
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 thatWebView
will use for the current process. As with all methods onProcessGlobalConfig
, this method must be called before the first instance ofWebView
is instantiated. This method is added to provide Android framework the capability to tweakWebView
settings. For general purpose applications, using this method is not recommended.
Version 1.7.0-rc01
10 مه 2023
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
5 آوریل 2023
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
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 thatWebView
will use for the current process. ( Ibd1a1 , b/250553687 )
رفع اشکال
- Fix invalid
ProGuard
rule causing build errors when usingDexGuard
( Ia65c2 , b/270034835 )
Version 1.7.0-alpha02
8 فوریه 2023
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
25 ژانویه 2023
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 theWebView
by adding the newDropDataContentProvider
to your app's manifest. ( 05a1a6 )
نسخه 1.6
نسخه 1.6.1
22 مارس 2023
androidx.webkit:webkit:1.6.1
is released. Version 1.6.1 contains these commits.
رفع اشکال
- Fix proguard parse error ( Ia65c2 )
نسخه 1.6.0
25 ژانویه 2023
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 inCookieManager
which returns only the name and value attributes of the cookies. -
WebSettingsCompat
has new methods to enable/disable the effect ofEnterpriseAuthenticationAppLinkPolicy
if set by admin inWebView
, 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 theX-Requested-With
header to allowlisted origins. The header has traditionally been sent on every request fromWebView
.
Version 1.6.0-rc01
11 ژانویه 2023
androidx.webkit:webkit:1.6.0-rc01
is released. Version 1.6.0-rc01 contains these commits.
رفع اشکال
- Fixed
NullPointerException
inWebViewFeature.isStartupFeatureSupported(Context, String)
when running on SDK < L. ( Ic7292 )
Version 1.6.0-beta01
7 دسامبر 2022
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 throwIllegalStateException
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
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 loadingWebView
.WebView
has some process-global configuration parameters that cannot be changed onceWebView
has been loaded (eg theWebView
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 loadsWebView
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 inWebView
version 105 and later. Previous versions ofWebView
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
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 agetCookieInfo
API which retrieves all attributes for all cookies set on a specific URL. This differs from the existinggetCookie
API inCookieManager
which returns only the name and value attributes of the cookies. ( I07365 , b/242161756 )
Version 1.6.0-alpha01
24 آگوست 2022
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 ofEnterpriseAuthenticationAppLinkPolicy
if set by admin inWebView
. This feature letsWebView
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.
نسخه 1.5.0
نسخه 1.5.0
24 آگوست 2022
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 onWebSettingsCompat
replaces the oldsetForceDark
andsetForceDarkStrategy
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 settingsetReverseBypassEnabled
totrue
. When this is in effect, all other URLs will bypass the configured proxy.
Version 1.5.0-rc01
10 آگوست 2022
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
29 ژوئن 2022
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
18 مه 2022
androidx.webkit:webkit:1.5.0-alpha01
is released. Version 1.5.0-alpha01 contains these commits.
ویژگی های جدید
- Add a new
getVariationsHeader()
method onWebViewCompat
to get the X-Client-Data header value sent by theWebView
. 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 )
نسخه 1.4.0
نسخه 1.4.0
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 replacesetSafeBrowsingWhitelist()
. 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
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
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
14 اکتبر 2020
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
16 سپتامبر 2020
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 replacesetSafeBrowsingWhitelist()
. 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 )
نسخه 1.3.0
نسخه 1.3.0
19 آگوست 2020
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
5 آگوست 2020
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
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
10 ژوئن 2020
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
27 مه 2020
androidx.webkit:webkit:1.3.0-alpha03
is released. Version 1.3.0-alpha03 contains these commits.
API Changes
-
addWebMessageListener
method now receives aSet<String>
of allowed origin rules (previously aList<String>
).
Version 1.3.0-alpha02
29 آوریل 2020
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
15 آوریل 2020
androidx.webkit:webkit:1.3.0-alpha01
is released. Version 1.3.0-alpha01 contains these commits.
ویژگی های جدید
-
ForceDarkStrategy
API to controlWebView
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.
نسخه 1.2.0
نسخه 1.2.0
4 مارس 2020
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
February 19, 2020
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
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
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.
نسخه 1.1.0
نسخه 1.1.0
7 نوامبر 2019
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
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
5 سپتامبر 2019
androidx.webkit:webkit:1.1.0-beta01
is released. The commits included in this version can be found here .
ویژگی های جدید
- New
InternalStoragePathHandler
inWebViewAssetLoader
to load files from the app's data directory.
API changes
-
ProxyConfig#getProxyRules()
now returns an unmodifiable list ofProxyRule
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 aNullPointerException
when loading files with special characters in their path names.
Version 1.1.0-alpha02
7 آگوست 2019
androidx.webkit:webkit:1.1.0-alpha02
is released. The commits included in this version can be found here .
ویژگی های جدید
-
WebViewAssetLoader
exposes thePathHandler
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 methodsaddDirect()
andaddDirect(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
7 مه 2019
androidx.webkit:webkit:1.1.0-alpha01
is released. The commits included in this version can be found here .
ویژگی های جدید
- Getter APIs to complement
setWebViewClient()
andsetWebChromeClient()
- 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
آخرین به روز رسانی | Stable Release | Release Candidate | نسخه بتا | Alpha Release |
---|---|---|---|---|
7 مه 2025 | 1.13.0 | - | 1.14.0-beta01 | - |
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.13.0" }
کاتلین
dependencies { implementation("androidx.webkit:webkit:1.13.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.
See the Issue Tracker documentation for more information.
نسخه 1.14
Version 1.14.0-beta01
7 مه 2025
androidx.webkit:webkit:1.14.0-beta01
is released. Version 1.14.0-beta01 contains these commits .
API Changes
- Add context as parameter to
startUpWebView()
API ( Ic29cd , b/406701301 )
Version 1.14.0-alpha01
9 آوریل 2025
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 throughorg.chromium.intent.action.PAY
intent.PaymentRequest
is disabled by default and WebView host apps can callWebSettingsCompat.setPaymentRequestEnabled(settings, true)
to enable it. In addition,PaymentRequest
requires a<queries>
tag inAndroidManifest.xml
. See documentation forsetPaymentRequestEnabled()
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. ویژگی های کلیدی:-
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. TheNavigation
object serves as a unique identifier for each navigation, allowing developers to correlate related navigation events. -
Page
class: Introduces thePage
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 inWebViewFeature
. ( I606fd ) - Adds
WebViewCompat#saveState
, akin toWebView#saveState
, but allows restricting the size of the returned state and deciding whether or not to save forward history entries. ( Iea7d6 ) - Add
maxPrerenders
config toSpeculativeLoadingConfig
API ( I67245 )
نسخه 1.13
Version 1.13.0
12 مارس 2025
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 inWebStorageCompat
should be preferred over the existing APIs inandroid.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 inWebView
. ( Ic506a , b/364904765 ) - Add socket tagging API to
WebView
for accounting ofWebView
's network traffic usingNetworkStatsManager
/TrafficStats
. This feature will only be available fromWebView
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
26 فوریه 2025
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
12 فوریه 2025
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 themimeType
parameter to suggest an extension for filenames derived from the URL parameter. ( I53ecd , b/382864232 )
Version 1.13.0-alpha03
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 inWebStorageCompat
should be preferred over the existing APIs inandroid.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 inWebView
. ( 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
11 دسامبر 2024
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 ofWebView
's network traffic usingNetworkStatsManager
/TrafficStats
. This feature will only be available fromWebView
M133. ( Ica441 , b/374932688 )
API Changes
- Update Prefetch API by renaming
PrefetchParameter
toSpeculativeLoadingParamaters
, introducing newPrefetchNetworkException
, replacingPrefetchOperationCallback
withOutcomeReceiverCompat
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
13 نوامبر 2024
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 )
نسخه 1.12
نسخه 1.12.1
2 اکتبر 2024
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
18 سپتامبر 2024
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 thisWebSettings
. 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 thisWebSettings
. 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/disableWebAuthn
calls in aWebView
for their apps usingWebSettingsCompat#setWebAuthenticationSupport
. ( I8187f )
Version 1.12.0-rc01
4 سپتامبر 2024
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
21 آگوست 2024
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. برای جزئیات بیشتر به این مقاله مراجعه کنید. ( Ia60e0 , b/345472586 )
Version 1.12.0-alpha02
12 ژوئن 2024
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/disableBackForwardCache
. 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
17 آوریل 2024
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/disableWebAuthn
calls in aWebView
for their apps usingWebSettingsCompat#setWebAuthenticationSupport
. ( I8187f )
نسخه 1.11
نسخه 1.11.0
1 مه 2024
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 newsetAudioMuted
andisAudioMuted
APIs, which are analogous to muting a tab in Chrome. - Introduced
URLUtilCompat
, which supports parsing ofContent-Disposition
headers that use thefilename*
encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse theContent-Disposition
header where a suggested file name based on URL and MIME-type is not desired.
Version 1.11.0-rc01
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
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
21 فوریه 2024
androidx.webkit:webkit:1.11.0-alpha02
is released. Version 1.11.0-alpha02 contains these commits.
ویژگی های جدید
- Add
setAudioMuted
andisAudioMuted
methods for muting (and unmuting)WebViews
. This method will allow you to prevent aWebView
from playing audio. ( Ie7a33 )
API Changes
-
URLUtilCompat
is made final as it should not be subclassed. ( I49ec1 )
Version 1.11.0-alpha01
7 فوریه 2024
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 inURLUtilCompat
supports parsing ofContent-Disposition
headers that use thefilename*
encoded value attribute as defined in RFC 6266 . The compatibility API also directly exposes a method to parse theContent-Disposition
header where a suggested file name based on URL and MIME-type is not desired. ( If6ae7 , b/309927164 )
نسخه 1.10
نسخه 1.10.0
24 ژانویه 2024
androidx.webkit:webkit:1.10.0
is released. Version 1.10.0 contains these commits.
Important changes since 1.9.0
- Added a new API to WebSettingsCompat to control the experimental Android WebView Media Integrity API behavior 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.10.0-rc01
10 ژانویه 2024
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
13 دسامبر 2023
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
29 نوامبر 2023
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.
نسخه 1.9
نسخه 1.9.0
29 نوامبر 2023
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.
- The Profile interface has different APIs to use to get associated data with this profile such as its name, GeoLocationPermissions , ServiceWorkerController , CookieManager and WebStorage . These objects are specific to the profile, and information is not shared between different profiles in the application.
- The profile used by a
WebView
instance can be changed using the WebViewCompat#setProfile method and retrieved using WebViewCompat#getProfile - The newly introduced ProfileStore let you manage the available profiles in your application, including the default profile.
- Existing WebView APIs such as CookieManager#getInstance will continue to operate on the Default profile.
- 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.
- The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a
- 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 .
- 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
- Added APIs to override user-agent metadata for client hints.
- We introduced a new API, WebSettingsCompat#setUserAgentMetadata to override the user-agent metadata for WebView 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 whenever the app changes the default user agent string using WebSettings.setUserAgentString to ensure the correct values are being used in all situations.
Version 1.9.0-rc01
15 نوامبر 2023
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 theUserAgentMetadata
class's getters and setters nullability consistent. ( Ibf195 ) - Annotating
ProfileStore
,WebViewCompat#setProfile
andWebViewCompat.getProfile
with@UiThread
. ( I499b2 )
Version 1.9.0-alpha01
18 اکتبر 2023
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 toWebView
instances, and retrieve them later for any data access. There is a singleton classProfileStore
to help you manage profiles by creation or deletion with APIs;getOrCreateProfile
,getProfile
,getAllProfileNames
anddeleteProfile
. TheProfile
class will have different APIs to use to get associated data with this profile such as its name,GeoLocationPermissions
,ServiceWorkerController
,CookieManager
andWebStorage
. EachWebView
will run with the default profile by default however, you can change that usingWebViewCompat#setProfile
Related to that, aWebView
's profile can be retrieved usingWebViewCompat#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 theWebView
. This method can also be used to disable Attribution Reporting inWebView
. Additionally we added a new APIWebSettingsCompat#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 APIWebSettingsCompat#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. UnlikeWebView.evaluateJavascript
, this API will allow execution of scripts in embedded Iframes when they load. ( Ide063 )
نسخه 1.8
نسخه 1.8.0
6 سپتامبر 2023
androidx.webkit:webkit:1.8.0
is released. Version 1.8.0 contains these commits.
Important changes since 1.7.0
- Add support for passing
ArrayBuffer
overWebMessagePortCompat#postMessage
,JavaScriptReplyProxy#postMessage
andWebViewCompat#postWebMessage
, receivingArrayBuffer
from JavaScript overWebMessagePortCompat
andWebMessageListener
, and receiving transferableArrayBuffer
from JavaScript overWebMessagePortCompat
. ( aosp/2596550 , b/251152171 )
Version 1.8.0-rc01
9 آگوست 2023
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
26 جولای 2023
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
7 ژوئن 2023
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
overWebMessagePortCompat#postMessage
,JsReplyProxy#postMessage
andWebViewCompat#postWebMessage
, receivingArrayBuffer
from JavaScript overWebMessagePortCompat
andWebMessageListener
, and receiving transferableArrayBuffer
from JavaScript overWebMessagePortCompat
. Please note that this API will only be available fromWebView
version 116. ( Ie7567 , b/251152171 )
نسخه 1.7
نسخه 1.7.0
24 مه 2023
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 theWebView
by adding the newDropDataContentProvider
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 thatWebView
will use for the current process. As with all methods onProcessGlobalConfig
, this method must be called before the first instance ofWebView
is instantiated. This method is added to provide Android framework the capability to tweakWebView
settings. For general purpose applications, using this method is not recommended.
Version 1.7.0-rc01
10 مه 2023
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
5 آوریل 2023
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
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 thatWebView
will use for the current process. ( Ibd1a1 , b/250553687 )
رفع اشکال
- Fix invalid
ProGuard
rule causing build errors when usingDexGuard
( Ia65c2 , b/270034835 )
Version 1.7.0-alpha02
8 فوریه 2023
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
25 ژانویه 2023
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 theWebView
by adding the newDropDataContentProvider
to your app's manifest. ( 05a1a6 )
نسخه 1.6
نسخه 1.6.1
22 مارس 2023
androidx.webkit:webkit:1.6.1
is released. Version 1.6.1 contains these commits.
رفع اشکال
- Fix proguard parse error ( Ia65c2 )
نسخه 1.6.0
25 ژانویه 2023
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 inCookieManager
which returns only the name and value attributes of the cookies. -
WebSettingsCompat
has new methods to enable/disable the effect ofEnterpriseAuthenticationAppLinkPolicy
if set by admin inWebView
, 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 theX-Requested-With
header to allowlisted origins. The header has traditionally been sent on every request fromWebView
.
Version 1.6.0-rc01
11 ژانویه 2023
androidx.webkit:webkit:1.6.0-rc01
is released. Version 1.6.0-rc01 contains these commits.
رفع اشکال
- Fixed
NullPointerException
inWebViewFeature.isStartupFeatureSupported(Context, String)
when running on SDK < L. ( Ic7292 )
Version 1.6.0-beta01
7 دسامبر 2022
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 throwIllegalStateException
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
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 loadingWebView
.WebView
has some process-global configuration parameters that cannot be changed onceWebView
has been loaded (eg theWebView
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 loadsWebView
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 inWebView
version 105 and later. Previous versions ofWebView
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
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 agetCookieInfo
API which retrieves all attributes for all cookies set on a specific URL. This differs from the existinggetCookie
API inCookieManager
which returns only the name and value attributes of the cookies. ( I07365 , b/242161756 )
Version 1.6.0-alpha01
24 آگوست 2022
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 ofEnterpriseAuthenticationAppLinkPolicy
if set by admin inWebView
. This feature letsWebView
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.
نسخه 1.5.0
نسخه 1.5.0
24 آگوست 2022
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 onWebSettingsCompat
replaces the oldsetForceDark
andsetForceDarkStrategy
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 settingsetReverseBypassEnabled
totrue
. When this is in effect, all other URLs will bypass the configured proxy.
Version 1.5.0-rc01
10 آگوست 2022
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
29 ژوئن 2022
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
18 مه 2022
androidx.webkit:webkit:1.5.0-alpha01
is released. Version 1.5.0-alpha01 contains these commits.
ویژگی های جدید
- Add a new
getVariationsHeader()
method onWebViewCompat
to get the X-Client-Data header value sent by theWebView
. 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 )
نسخه 1.4.0
نسخه 1.4.0
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 replacesetSafeBrowsingWhitelist()
. 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
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
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
14 اکتبر 2020
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
16 سپتامبر 2020
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 replacesetSafeBrowsingWhitelist()
. 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 )
نسخه 1.3.0
نسخه 1.3.0
19 آگوست 2020
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
5 آگوست 2020
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
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
10 ژوئن 2020
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
27 مه 2020
androidx.webkit:webkit:1.3.0-alpha03
is released. Version 1.3.0-alpha03 contains these commits.
API Changes
-
addWebMessageListener
method now receives aSet<String>
of allowed origin rules (previously aList<String>
).
Version 1.3.0-alpha02
29 آوریل 2020
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
15 آوریل 2020
androidx.webkit:webkit:1.3.0-alpha01
is released. Version 1.3.0-alpha01 contains these commits.
ویژگی های جدید
-
ForceDarkStrategy
API to controlWebView
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.
نسخه 1.2.0
نسخه 1.2.0
4 مارس 2020
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
February 19, 2020
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
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
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.
نسخه 1.1.0
نسخه 1.1.0
7 نوامبر 2019
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
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
5 سپتامبر 2019
androidx.webkit:webkit:1.1.0-beta01
is released. The commits included in this version can be found here .
ویژگی های جدید
- New
InternalStoragePathHandler
inWebViewAssetLoader
to load files from the app's data directory.
API changes
-
ProxyConfig#getProxyRules()
now returns an unmodifiable list ofProxyRule
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 aNullPointerException
when loading files with special characters in their path names.
Version 1.1.0-alpha02
7 آگوست 2019
androidx.webkit:webkit:1.1.0-alpha02
is released. The commits included in this version can be found here .
ویژگی های جدید
-
WebViewAssetLoader
exposes thePathHandler
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 methodsaddDirect()
andaddDirect(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
7 مه 2019
androidx.webkit:webkit:1.1.0-alpha01
is released. The commits included in this version can be found here .
ویژگی های جدید
- Getter APIs to complement
setWebViewClient()
andsetWebChromeClient()
- 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.