CameraX

CameraX افزودنی به Jetpack است که اضافه کردن قابلیت های دوربین به برنامه شما را آسان تر می کند. این کتابخانه تعدادی اصلاحات سازگاری و راه‌حل‌ها را برای کمک به سازگاری تجربه توسعه‌دهنده در بسیاری از دستگاه‌ها ارائه می‌کند.

این جدول تمام مصنوعات موجود در گروه androidx.camera را فهرست می کند.

مصنوع انتشار پایدار کاندید را آزاد کنید نسخه بتا انتشار آلفا
دوربین-دوربین 2 1.4.2 - 1.5.0-بتا01 -
هسته دوربین 1.4.2 - 1.5.0-بتا01 -
دوربین - آهنگسازی - - 1.5.0-بتا01 -
جلوه های دوربین 1.4.2 - 1.5.0-بتا01 -
پسوند دوربین 1.4.2 - 1.5.0-بتا01 -
دوربین-ویژگی-ترکیب-پرس و جو - - - 1.5.0-alpha06
دوربین-ویژگی-ترکیب-پرس و جو-بازی-سرویس - - - 1.5.0-alpha06
چرخه عمر دوربین 1.4.2 - 1.5.0-بتا01 -
دوربین-ملکیت-دید 1.4.2 - 1.5.0-بتا01 -
دید دوربین 1.4.2 - 1.5.0-بتا01 -
دوربین - منظره یاب - - 1.3.0-beta02 1.4.0-alpha07
دوربین-فیلم 1.4.2 - 1.5.0-بتا01 -
آخرین به روز رسانی این کتابخانه در: 7 می 2025

تست دستگاه

CameraX بر روی دستگاه های بسیاری در آزمایشگاه ما آزمایش شده است. برای مشاهده فهرستی از دستگاه‌هایی که در حال حاضر در آزمایشگاه هستند، به دستگاه‌های آزمایش‌شده در آزمایشگاه CameraX مراجعه کنید.

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

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

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

شیار

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.5.0-beta01"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

کاتلین

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.5.0-beta01"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}
،

شیار

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.5.0-beta01"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

کاتلین

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.5.0-beta01"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}

بازخورد

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

یک شماره جدید ایجاد کنید

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

Camera Viewfinder Compose نسخه 1.0

نسخه 1.0.0-alpha02

12 ژوئن 2024

androidx.camera:camera-viewfinder-compose:1.0.0-alpha02 منتشر شد. نسخه 1.0.0-alpha02 حاوی این تعهدات است.

نسخه 1.0.0-alpha01

14 مه 2024

androidx.camera:camera-viewfinder-compose:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 حاوی این تعهدات است.

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

  • کتابخانه جدید این کتابخانه یک Compose native Viewfinder را معرفی می کند که می تواند با CameraX و Camera2 استفاده شود. منظره یاب قابل ترکیب از نسبت های مختلف تصویر و مدیریت رویدادهای لمسی پشتیبانی می کند.

منظره یاب دوربین نسخه 1.4

نسخه 1.4.0-alpha07

12 ژوئن 2024

androidx.camera:camera-viewfinder:1.4.0-alpha07 و androidx.camera:camera-viewfinder-core:1.4.0-alpha07 منتشر شد. نسخه 1.4.0-alpha07 حاوی این commit ها است.

نسخه 1.4.0-alpha06

14 مه 2024

androidx.camera:camera-viewfinder:1.4.0-alpha06 و androidx.camera:camera-viewfinder-core:1.4.0-alpha06 منتشر شد. نسخه 1.4.0-alpha06 حاوی این commit ها است.

تغییرات API

  • برای انعکاس بهتر پیاده سازی های اساسی، و افزودن ثابت های ثابت برای TransformationInfo.sourceRotation ، نام Viewfinder ImplementationMode تغییر نام دهید. ( IC6149 )
  • ZoomGestureDetector.ZoomEvent اضافه شد تا حالت‌های حرکت زوم را در بر بگیرد. ( I84cdf )

دوربین نسخه 1.5

نسخه 1.5.0-beta01

7 مه 2025

androidx.camera:camera-*:1.5.0-beta01 منتشر شد. نسخه 1.5.0-beta01 حاوی این تعهدات است.

تغییرات API

  • پروژه‌های منتشر شده با Kotlin 2.0 برای مصرف نیاز به KGP 2.0.0 یا جدیدتر دارند ( Idb6b5 )
  • ContentScale و Alignment اکنون می توانند در منظره یاب برای مقیاس بندی و قرار دادن سطح نمایش داده شده در ظرف آن، مشابه نحوه رفتار androidx.compose.foundation.Image استفاده شوند. ( Ibcea3 )
  • TransformationInfo اکنون مقادیر پیش فرض را برای همه آرگ ها دارد. این امکان ایجاد منظره‌یاب‌ها را بدون TransformationInfo فراهم می‌کند، که به‌طور پیش‌فرض چرخش منبع 0، بدون آینه‌سازی منبع و بدون برش رکت خواهد بود. ( I2b1b2 )
  • LifecycleCameraProvider اضافه شد، که ارائه‌دهنده دوربینی است که می‌تواند با پیکربندی‌های مختلف برای ویژگی‌هایی مانند دسترسی به دوربین یک دستگاه مجازی با پیکربندی با یک زمینه سفارشی‌سازی‌شده، نمونه‌سازی شود. ( Ia2992 )

رفع اشکال

  • هنگام استفاده از ImageAnalysis با جریان دیگری که از TEMPLATE_RECORD در دستگاه Samsung SM-E556B استفاده می‌کند، مشکل یخ‌زدگی پیش‌نمایش برطرف شد. ( Ic0e62 , b/409478042 )
  • هنگام استفاده از ImageAnalysis با جریان دیگری که از TEMPLATE_RECORD در دستگاه SM-M556B سامسونگ استفاده می‌کند، مشکل انجماد پیش‌نمایش برطرف شد. ( Ic1a6a , b/395822788 )
  • هنگام انجام عملیات مربوط به بزرگنمایی، مشکل AssertError حالت شبانه افزونه‌ها در دستگاه‌های Android 15 Pixel برطرف شد. ( I27a5d , b/401460276 )
  • هنگام استفاده از CameraController ، مشکل مختصات محدود کردن نادرست جعبه آنالایزر ML Kit را برطرف کنید. ( Iae91b , b/409808510 )

نسخه 1.5.0-alpha06

26 فوریه 2025

androidx.camera:camera-*:1.5.0-alpha06 منتشر شد. نسخه 1.5.0-alpha06 حاوی این commit ها است.

تغییرات API

  • CameraInfo.getTorchStrengthLevel ، CameraInfo.getMaxTorchStrengthLevel و CameraControl.setTorchStrengthLevel اضافه شد تا امکان سفارشی کردن روشنایی مشعل را فراهم کند ( I00878 )
  • یک API CameraController#setTapToFocusAutoCancelDuration اضافه شده است تا کاربران بتوانند رفتار لغو خودکار را برای رویدادهای ضربه به فوکوس PreviewView کنترل کنند. به طور پیش‌فرض، CameraX رویدادهای فوکوس را پس از 5 ثانیه لغو می‌کند (یعنی فوکوس دوربین بازنشانی می‌شود) و این API اجازه می‌دهد این مدت زمان را تغییر دهید یا لغو خودکار را به طور کلی غیرفعال کنید. ( ICf59a )
  • FLASH_STATE_READY به NOT_FIRED تغییر نام داده است و سایر نام‌های ثابت FlashState برای خوانایی بهتر ساده شده‌اند. ( I8771d )
  • Exposur Low Light Boost API. دستگاه‌های دارای Android 15 یا بالاتر می‌توانند از تقویت در نور کم پشتیبانی کنند. این ویژگی می تواند به طور خودکار روشنایی جریان های پیش نمایش، ویدئو یا تجزیه و تحلیل تصویر را در شرایط کم نور تنظیم کند. برنامه‌ها می‌توانند از API جدید برای موارد زیر استفاده کنند: 1. از CameraInfo#isLowLightBoostSupported برای بررسی در دسترس بودن ویژگی استفاده کنید. 2. از CameraControl#enableLowLightBoostAsync برای فعال کردن حالتی که دستگاه‌ها می‌توانند آن را پشتیبانی کنند، استفاده کنید. 3. از CameraInfo#getLowLightBoostState برای نظارت بر وضعیت تقویت در نور کم استفاده کنید. ( I937ed )
  • کلاس‌های compat را اضافه کنید تا امکان جستجوی سریع‌تر غیر دوربینی در پرس و جوی دوربین-ویژگی-ترکیب-را فراهم کنید. ( Ie97ee )
  • برای رویدادهای CameraController ضربه به فوکوس، یک API جدید getTapToFocusInfoState() اکنون موقعیت ضربه مربوطه را نیز با برگرداندن LiveData از کلاس TapToFocusInfo نشان می دهد در حالی که API قبلی LiveData<Integer> بازگشتی getTapToFocusState() به نفع newPI منسوخ شده است. ( I238d2 )

رفع اشکال

  • مشکل عدم استفاده از تثبیت پیش نمایش زمانی که تثبیت پیش نمایش با برنامه های افزودنی فعال است، برطرف شد. ( I24ad7 )
  • هنگامی که CameraX یک رویداد فوکوس را که به طور پیش‌فرض بعد از 5 ثانیه اتفاق می‌افتد، به‌طور خودکار لغو می‌کند، رویداد حالت فوکوس CameraController ثابت به TAP_TO_FOCUS_NOT_STARTED بازنشانی نمی‌شود. ( I31954 )
  • ثابت ماندن پیش‌نمایش هنگام استفاده از Zero Shutter Lag (ZSL) پس از چندین عکسبرداری به دلیل منابع تصویر منتشر نشده. ( IC3c2a )
  • مشکلاتی که در برخی از دستگاه‌ها ویدیوهای UHD قرمز رنگ می‌شوند، زمانی که خط لوله شامل OpenGL می‌شود، برطرف شد. ( IDcedc )

نسخه 1.5.0-alpha05

15 ژانویه 2025

androidx.camera:camera-*:1.5.0-alpha05 منتشر شد. نسخه 1.5.0-alpha05 حاوی این commit ها است.

تغییرات API

  • افزودن VideoCapture.getSelectedQuality() برای دانستن کیفیت انتخاب شده بر اساس QualitySelector . ( I70508 , b/204288986 )
  • هنگامی که یک عکس با ImageCapture.OnImageCapturedCallback API فراخوانی می شود، اکنون می توان از ImageInfo در ImageProxy برگشتی برای دانستن اینکه آیا فلش از طریق ImageInfo.getFlashState() API جدید شلیک شده است یا خیر، استفاده کرد. ( Id2c61 , b/380527406 )
  • پشتیبانی از فرمت خروجی OUTPUT_IMAGE_FORMAT_NV21 برای ImageAnalysis اضافه شد. ( I484ab )
  • حاشیه نویسی تجربی مصنوع featurecombinationquery ( I4427f ) را حذف کنید
  • محدوده نسبت بزرگنمایی مجاز برای CameraControl را با ویژگی‌های ویژه برنامه‌های افزودنی هنگامی که حالت افزونه‌ها فعال است، تنظیم کنید. ( I85af1 )

رفع اشکال

  • compileSdk به عنوان 35 برای استفاده از API مربوط به Android 15 ارتقا یافت. برنامه هایی که از کتابخانه های CameraX استفاده می کنند نیز باید تنظیمات پیکربندی compileSdk خود را ارتقا دهند. ( IC80cd )
  • این کتابخانه اکنون از حاشیه‌نویسی‌های پوچ JSpecify استفاده می‌کند که نوع استفاده هستند. توسعه دهندگان Kotlin باید از آرگومان کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند: -Xjspecify-annotations=strict (این پیش فرض با نسخه 2.1.0 کامپایلر Kotlin شروع می شود). ( Idc6c6 , b/326456246 )

نسخه 1.5.0-alpha04

11 دسامبر 2024

androidx.camera:camera-*:1.5.0-alpha04 منتشر شد. نسخه 1.5.0-alpha04 حاوی این تعهدات است.

تغییرات API

  • Exposur ImageCapture.Builder#setOutputFormat و ImageCaptureCapabilities#getSupportedOutputFormats به عنوان APIهای پایدار ( Ieb04a )
  • برای دریافت اطلاعات وضوح زمانی که VideoCapture به چرخه زندگی متصل است، VideoCapture.getResolutionInfo() اضافه کنید. ( ICB478 )
  • PreviewView.getScreenFlash و PreviewView.setScreenFlashOverlayColor به عنوان APIهای پایدار نمایش داده شد. ( I74fee )

رفع اشکال

  • مشکل خرابی عکسبرداری در دستگاه Vivo 1610 هنگام عکس گرفتن با فلاش در تاریکی برطرف شد. ( I366f4 )
  • روشن شدن خاموش شدن غیرمنتظره مشعل پس از ثبت تصویر در Redmi Note 6 Pro. ( I2e0e8 , b/377144569 )
  • مشکلی در دستگاه‌های Pixel Android 15 برطرف شد که در آن حالت NIGHT در برنامه‌های افزودنی تا زمانی که دوربین روی یک شیء نزدیک فوکوس نکند، عکس‌های ثابت ثبت نمی‌کند. ( I228d4 )
  • هنگامی که برنامه‌های افزودنی فعال هستند و VideoCapture به هم متصل می‌شوند، مشکل عدم کارکرد ضبط تصاویر ثابت برطرف شد. ( I5c745 )
  • در صورتی که دستگاه بتواند از آن پشتیبانی کند، پشتیبانی از ضبط تصاویر ثابت UltraHDR برای برنامه‌های افزودنی فعال است. ( I48300 )
  • مشکل زمان‌بندی فلاش برای ضبط فلاش با هدف‌گیری CameraEffect ضبط تصویر در دستگاه‌های TCL برطرف شد. ( I7698c )

نسخه 1.5.0-alpha03

30 اکتبر 2024

androidx.camera:camera-*:1.5.0-alpha03 منتشر شد. نسخه 1.5.0-alpha03 حاوی این commit ها است.

تغییرات API

  • APIهای فرمت خروجی را برای RAW و RAW + JPEG ImageCapture اضافه کنید، بررسی قابلیت دستگاه در ImageCaptureCapabilities#getSupportedOutputFormats نمایش داده می شود. OUTPUT_FORMAT_RAW برای گرفتن تصویر RAW است که فرمت Adobe DNG است و OUTPUT_FORMAT_RAW_JPEG برای گرفتن همزمان تصاویر RAW و JPEG است. ImageCapture#takePicture API جدید برای ضبط همزمان تصویر استفاده می شود، باید دو OutputFileOptions ارائه کند، اولی برای تصویر RAW و دومی برای تصویر JPEG. ( Ib0f3d )

رفع اشکال

  • هنگامی که VideoCapture فعال است، مشکل پیش‌نمایش و عدم نوردهی ویدیو در دستگاه‌های TCL برطرف شد. ( ID7a64 )
  • مشکلی که در فراخوانی startFocusMetering با PreviewView.getMeteringPointFactory زمانی که یک افکت فعال می‌شود یا زمانی که 4 مورد استفاده محدود می‌شود، مختصات حسگر صحیح را دریافت نمی‌کند، برطرف شد. ( I916c5 , b/345993685 )
  • رویداد VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE هنگام ضبط ویدیو فعال نمی‌شود و فضای ذخیره‌سازی کافی در دسترس نیست. ( I35779 , b/356399842 )

نسخه 1.5.0-alpha02

2 اکتبر 2024

androidx.camera:camera-*:1.5.0-alpha02 منتشر شد. نسخه 1.5.0-alpha02 حاوی این تعهدات است.

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

  • API های جدید برای جستجو در ویژگی های دوربین که توسط دستگاه پشتیبانی می شود. به عنوان مثال، بررسی اینکه آیا HDR و 60FPS را می توان همزمان فعال کرد یا خیر. این شامل 2 مصنوع است: دوربین-ویژگی-ترکیب-پرس و جو و دوربین-ویژگی-ترکیب-پرسش-بازی-سرویس. این نسخه سازگار CameraManager#getCameraDeviceSetup#isSessionConfigurationSupported API با اطلاعات اضافی ارائه شده توسط Google Play Service است.

رفع اشکال

  • مشکل نرخ فریم هدف Preview/VideoCapture در دستگاه‌های سطح LEGACY برطرف شد. نرخ فریم هدف تنظیم شده از طریق setTargetFrameRate یا Camera2Interop API همیشه روی مقدار ارائه شده توسط AeFpsRangeLegacyQuirk بازنویسی می شد. با این اصلاح، کتابخانه CameraX به مقدار تنظیم شده از طریق setTargetFrameRate یا Camera2Interop API احترام می گذارد. ( Ie2d32 )
  • اضافه شدن قابلیت های فلاش/مشعل/3A برای عکس برداری با CameraEffect . عکس‌های گرفته شده با CameraEffect اکنون باید همان پردازش‌های قبل و بعد از عکسبرداری را داشته باشند (مثلاً ماشه فلاش، همگرایی 3A و غیره در صورت لزوم) مانند ضبط تصویر بدون CameraEffect . ( I5ff30 )
  • اندازه‌های خروجی مشکل‌دار برای ImageAnalysis در دستگاه Samsung SM-A057G حذف شد. هنگامی که ImageAnalysis از وضوح بزرگتر یا برابر با 1920x1440 استفاده می کند، مشکل پیش نمایش سیاه را ایجاد می کند. برای جلوگیری از بروز مشکل ExcludedSupportedSizesQuirk روی دستگاه SM-A057G اعمال کنید. ( I63dfe , b/365877975 )
  • مشکل نرخ فریم هدف Preview/VideoCapture زمانی که مکانیزم اشتراک‌گذاری جریان به صورت داخلی برای اشتراک‌گذاری یک جریان در Preview و VideoCapture فعال است، برطرف شد. ( I4fdac )
  • راه حل برای رفع مشکل نادرست فراداده تصویر JPEG در دستگاه های Samsung S10e و S10+ فعال شد. با رفع این مشکل، CameraX می‌تواند با موفقیت تصویر JPEG را ذخیره کند، یا در صورت بروز مشکل فراداده تصویر JPEG نادرست، می‌توان هنگام فراخوانی تابع ImageProxy.toBitmap() در این دستگاه‌ها، اشیای Bitmap درست را برگرداند. ( Iae493 , b/356428987 )
  • برنامه‌های افزودنی غیرفعال برای دوربین پشتی Samsung A52s که شناسه آن 0 است، زیرا ممکن است هنگام ثبت تصاویر HDR و پیکربندی جلسات ضبط برای حالت‌های BOKEH یا FACE_RETOUCH، خرابی‌های بومی رخ دهد. ( I03ec9 , b/364152642 )
  • رویداد VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE هنگام ضبط ویدیو فعال نمی‌شود و فضای ذخیره‌سازی کافی در دسترس نیست. ( Ia5b4f , b/356399842 )
  • مشکلی که در آن تلاش دوم برای ضبط ویدیو در Oppo A5 (CPH1931) ناموفق بود، برطرف شد. ( I181d6 )

نسخه 1.5.0-alpha01

4 سپتامبر 2024

androidx.camera:camera-*:1.5.0-alpha01 منتشر شد. نسخه 1.5.0-alpha01 حاوی این تعهدات است.

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

  • یک مصنوع جدید با camera-compose برای CameraX Viewfinder Compose Adapter منتشر شده است که یک جریان پیش نمایش از CameraX SurfaceRequest از camera-core را نمایش می دهد. ( I8666e )
  • یک Composable جدید به نام CameraXViewfinder اضافه شده است که به عنوان یک ترکیب اصطلاحی عمل می کند که CameraX SurfaceRequest s را برای Viewfinder قابل ترکیب تطبیق می دهد. ( I4770f )

تغییرات API

  • API را برای تنظیم تنظیمات ترکیب برای فیلمبرداری همزمان با دوربین دوگانه ارائه دهید. تنظیمات شامل مقدار آلفا برای ترکیب، افست در مختصات x، y، مقیاس عرض و ارتفاع پنجره نمایش قاب دوربین است. افست، عرض و ارتفاع در مختصات نرمال شده دستگاه مشخص شده است. ( Ia2b8a )
  • CameraProvider.getCameraInfo به عنوان یک API رسمی معرفی کرد. ( I901cd )
  • API PendingRecording.withAudioEnabled(boolean initialMuted) برای کنترل حالت اولیه بی صدا اضافه شد. ( I635c3 , b/354829267 )

رفع اشکال

  • خرابی زمانی که bindToLifecycle با LifecycleOwner از بین رفته فراخوانی می شود، رفع شد. ( I6e6d8 )
  • پیش‌نمایش ثابت، صفحه سیاه در دوربین جلو است در حالی که با VideoCapture در Motorola Edge 20 Fusion متصل می‌شود. ( I1fe88 )
  • پیکربندی را برای تشخیص حرکات زوم در PreviewView برای بهبود صافی بهینه کرد. ( I04ffc )

دوربین نسخه 1.4

نسخه 1.4.2

26 مارس 2025

androidx.camera:camera-*:1.4.2 منتشر شد. نسخه 1.4.2 حاوی این commit ها است.

رفع اشکال

  • هنگام استفاده از ImageAnalysis با جریان دیگری که از TEMPLATE_RECORD در Samsung Galaxy M55 استفاده می‌کند، مشکل یخ‌زدگی پیش‌نمایش برطرف شد. ( Ic1a6a , b/395822788 )

نسخه 1.4.1

11 دسامبر 2024

androidx.camera:camera-*:1.4.1 منتشر شد. نسخه 1.4.1 شامل این commit ها است.

رفع اشکال

  • مشکلی در دستگاه‌های Pixel Android 15 برطرف شد که در آن حالت NIGHT در برنامه‌های افزودنی تا زمانی که دوربین روی یک شیء نزدیک فوکوس نکند، عکس‌های ثابت ثبت نمی‌کند. ( I228d4 )
  • مشکل نقص ImageCapture#takePicture هنگامی که برنامه‌های افزودنی فعال هستند و VideoCapture به هم متصل می‌شوند، رفع شد. ( I5c745 )

نسخه 1.4.0

30 اکتبر 2024

androidx.camera:camera-*:1.4.0 منتشر شد. نسخه 1.4.0 حاوی این تعهدات است.

تغییرات مهم از 1.3.0

CameraX 1.4.0 مملو از به روز رسانی های هیجان انگیز است! در اینجا خلاصه ای وجود دارد:

ویژگی عنوان: 10 بیت HDR:

  • عکس ها و فیلم های HDR خیره کننده را به راحتی ثبت کنید.
  • از کدگذاری HLG و 10 بیتی HEVC پشتیبانی می کند.
  • از پیش نمایش 10 بیتی HDR و قابلیت های دستگاه پرس و جو لذت ببرید.
  • با تصاویر UltraHDR و ویدیوهای HDR در طیف رو به رشدی از دستگاه ها کار می کند.

سایر ویژگی های جالب:

  • برنامه های افزودنی Kotlin: عملکردهای takePicture و awaitInstance را اضافه کرد.
  • جلوه‌های بی‌درنگ: جلوه‌هایی مانند واترمارک و برجسته‌سازی اشیا را اعمال کنید.
  • CameraController API: کنترل های جدید برای پیکربندی ضبط ویدیو.
  • تثبیت پیش نمایش: قابلیت دستگاه را جستجو کنید و تثبیت را فعال کنید.
  • بهبودهای VideoCapture: کنترل دقیق تر بر کیفیت و دسترسی به وضوح بالاتر.
  • CameraX Extensions ادغام: ادغام یکپارچه با VideoCapture و ویژگی های جدید ImageCapture .
  • API صدای شاتر: به راحتی الزامات صدای شاتر منطقه ای را بررسی کنید.
  • فلاش صفحه: بهبود عکس‌های کم نور برای دوربین‌های جلو.
  • APIهای فراداده برنامه‌های افزودنی دوربین: پشتیبانی از API برای تنظیم قدرت برنامه‌های افزودنی و دریافت اعلان از حالت برنامه‌های افزودنی فعلی در ExtensionMode#AUTO . می‌توانید رفع اشکال‌های بیشتری را در اطلاعیه‌های بتا و RC ما پیدا کنید.

نسخه 1.4.0-rc04

16 اکتبر 2024

androidx.camera:camera-*:1.4.0-rc04 منتشر شد. نسخه 1.4.0-rc04 حاوی این commit ها است.

رفع اشکال

  • مشکلی که در فراخوانی startFocusMetering با PreviewView.getMeteringPointFactory زمانی که یک افکت فعال می‌شود یا زمانی که 4 مورد استفاده محدود می‌شود، مختصات حسگر صحیح را دریافت نمی‌کند، برطرف شد. ( I916c5 , b/345993685 )

نسخه 1.4.0-rc03

2 اکتبر 2024

androidx.camera:camera-*:1.4.0-rc03 منتشر شد. نسخه 1.4.0-rc03 حاوی این commit ها است.

رفع اشکال

  • اضافه شدن قابلیت های فلاش/مشعل/3A برای عکس برداری با CameraEffect . عکس‌های گرفته شده با CameraEffect اکنون باید همان پردازش‌های قبل و بعد از عکسبرداری را داشته باشند (مثلاً ماشه فلاش، همگرایی 3A و غیره در صورت لزوم) مانند ضبط تصویر بدون CameraEffect . ( I5ff30 )
  • بهینه سازی نرمی نزدیک به زوم در PreviewView ( I04ffc )
  • Ultra HDR را از قابلیت خروجی 10 بیت جدا کنید، زیرا پشتیبانی Ultra HDR دیگر نیازی به دستگاه‌ها ندارد که دارای قابلیت خروجی 10 بیتی باشند. ( I96ff2 , I0c3b3 )

نسخه 1.4.0-rc02

18 سپتامبر 2024

androidx.camera:camera-*:1.4.0-rc02 منتشر شد. نسخه 1.4.0-rc02 حاوی این commit ها است.

رفع اشکال

  • خرابی زمانی که bindToLifecycle با LifecycleOwner از بین رفته فراخوانی می شود، رفع شد. ( I6e6d8 )
  • انیمیشن دید در ScreenFlashView برای ScreenFlash#apply اضافه شده است که همچنین اشکالات ناشی از تغییر روشنایی را که به صورت ناهمزمان پس از مدتی تکمیل می‌شود برطرف می‌کند. ( I37cdb )
  • با نادیده گرفتن تنظیمات زوم در چارچوب در دستگاه های پشتیبانی شده، نرمی زوم را بهبود بخشید.

نسخه 1.4.0-rc01

7 آگوست 2024

androidx.camera:camera-*:1.4.0-rc01 منتشر شد. نسخه 1.4.0-rc01 حاوی این commit ها است.

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

  • CameraInfo.getCameraInfo آزمایشی اضافه شد تا اطلاعات دوربین خاصی را بدون نیاز به اتصال موارد استفاده به دوربین ارائه دهد. ( I550d1 )

تغییرات API

  • APIهای PreviewView.getScreenFlash و PreviewView.setScreenFlashOverlayColor برای مواردی که ScreenFlashView صراحتاً اضافه نشده است اضافه شد. ( I43945 )

رفع اشکال

  • مشکلات نوردهی و ته رنگ را در هنگام گرفتن عکس با فلاش فعال در نور کم با محدودیت استفاده از VideoCapture برطرف کرد. ( IC9814 )
  • این مشکل را برطرف کنید که قطع کردن درخواست takePicture با فعال کردن برنامه‌های افزودنی ممکن است به نتیجه نرسد و درخواست takePicture بعدی دیگر کار نکند. ( Iae78f )
  • مشکل نشت حافظه که هنگام فعال کردن برنامه‌های افزودنی رخ می‌دهد، برطرف شد. ( Iab276 )
  • رفع نقص عملکرد افزونه‌های CameraX در دستگاه‌هایی مانند Pixel 7/8 و سری Samsung Galaxy S24. این مشکل، ناشی از مشکل تبدیل Camera2OutputConfigImpl در حالت انتشار، پس از ارتقاء AGP به 8.5.1 و فعال کردن کوچک‌سازی ظاهر شد. ( I99598 , b/354824993 )

نسخه 1.4.0-beta02

12 ژوئن 2024

androidx.camera:camera-*:1.4.0-beta02 منتشر شد. نسخه 1.4.0-beta02 حاوی این تعهدات است.

تغییرات API

  • مشابه VideoCapture ، setMirrorMode برای استفاده از حالت Preview اضافه کنید. از حالت آینه روشن و خاموش برای پخش جریانی پیش‌نمایش از طریق OutputConfiguration.setMirrorMode از API 33 و بالاتر پشتیبانی می‌کند، برای APIهای قدیمی‌تر، بدون عملیات است. ( I821f4 )

رفع اشکال

  • وقتی ImageCapture 1920x1080 را در ترکیب Preview + VideoCapture + ImageCapture UseCase انتخاب می‌کند، برنامه‌ها نمی‌توانند با موفقیت در Samsung Tab A8 عکس بگیرند، رفع شد. ( I5a463 , b/336925549 )
  • ضبط مداوم ثابت ممکن است پس از تعویض دوربین، ضبط را ادامه ندهد. ( ICb0a1 )

نسخه 1.4.0-beta01

14 مه 2024

androidx.camera:camera-*:1.4.0-beta01 منتشر شد. نسخه 1.4.0-beta01 حاوی این تعهدات است.

تغییرات API

  • ZoomGestureDetector.ZoomEvent اضافه شد تا حالت‌های حرکت زوم را در بر بگیرد. ( I84cdf )

رفع اشکال

  • اشکالی رفع شد که همچنان از مقادیر تکرار درخواست FPS/حالت تثبیت استفاده نمی‌کند که ممکن است جلسه ضبط را دوباره ایجاد کند و باعث ایجاد مشکلات تأخیر یا توقف پیش‌نمایش در برخی دستگاه‌ها شود. ( I7dc0b )
  • رفع اشکالی که در آن هنگام فعال بودن CameraEffect در برخی دستگاه‌ها، نمی‌توان وضوح بالا را انتخاب کرد. (به عنوان مثال 4000x3000 در Samsung A32 5G). ( Ie3ed3 , b/337336152 )
  • رفع خرابی هنگام عکس‌برداری با پیش‌نمایش، ImageCapture و VideoCapture(UHD) در Pixel 4XL API29. ( I5b288 )
  • پشتیبانی از دستگاه‌های مجازی: متنی که به ProcessCameraProvider منتقل می‌شود، شناسه دستگاه را برای اطمینان از عملکرد در یک محیط دستگاه مجازی حفظ می‌کند. ( I5ba48 )

نسخه 1.4.0-alpha05

17 آوریل 2024

androidx.camera:camera-*:1.4.0-alpha05 منتشر شد. نسخه 1.4.0-alpha05 حاوی این تعهدات است.

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

  • ProcessCameraProvider را به پیاده سازی Kotlin تبدیل کرد. ( I46d4f )
  • توابع تعلیق ImageCapture.takePicture اضافه شد تا امکان فراخوانی آن را به روشی اصطلاحی Kotlin فراهم کند. ( I920be )

تغییرات API

  • APIهای فرمت خروجی را به ImageCapture اضافه کنید و متد getSupportedOutputFormats به ImageCaptureCapabilities برای جستجو در قابلیت دستگاه اضافه کنید. مقدار فرمت خروجی پیش‌فرض OUTPUT_FORMAT_JPEG است که تصاویر SDR را در قالب JPEG می‌گیرد. وقتی دستگاه از Ultra HDR پشتیبانی می کند و فرمت خروجی روی OUTPUT_FORMAT_JPEG_ULTRA_HDR تنظیم شده است، CameraX تصاویر فشرده شده Ultra HDR را با استفاده از فرمت تصویر JPEG/R می گیرد. این فرمت با فرمت SDR JPEG سازگار است و از رندر HDR محتوا پشتیبانی می کند. این بدان معناست که در برنامه‌ها یا دستگاه‌های قدیمی‌تر، تصاویر به‌صورت یکپارچه به صورت JPEG معمولی ظاهر می‌شوند. در برنامه ها و دستگاه هایی که برای پشتیبانی کامل از فرمت به روز شده اند، تصاویر به صورت HDR ظاهر می شوند. ( I5de50 )
  • افزودن PhysicalCameraInfo در CameraInfo برای پرس و جو از اطلاعات دوربین فیزیکی و افزودن تنظیم کننده/گیرنده شناسه فیزیکی دوربین در CameraSelector ( Ic5b90 )
  • CameraController#COORDINATE_SYSTEM_VIEW_REFERENCED را با ImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCED جایگزین کنید. مقدار ثابت ثابت باقی می ماند. این برای ادغام تمام ثابت ها در یک مکان است. ( I890bb )
  • RetryPolicy API جدید به توسعه دهندگان این امکان را می دهد تا رفتار تلاش مجدد را برای مقداردهی اولیه CameraX سفارشی کنند. ( I36dd2 )
  • فعال کردن ایجاد شی ImageCaptureLatencyEstimate برای کمک به آزمایش پذیری ( Iaba99 )
  • یک ImageAnalysis#COORDINATE_SYSTEM_SENSOR اضافه کنید. هنگامی که از این مورد استفاده می شود، MlKitAnalyzer مختصات را در سیستم مختصات سنسور دوربین برمی گرداند. ( I3ec61 )
  • API فراداده برنامه‌های افزودنی در معرض دید. رابط‌های جدید CameraExtensionsInfo و CameraExtensionsControl به برنامه‌ها اجازه می‌دهند تنظیمات قدرت افزونه را نظارت و تنظیم کنند. برنامه‌ها می‌توانند نمونه CameraExtensionsInfo یا CameraExtensionsControl را از طریق روش‌های ExtensionsManager#getCameraExtensionsInfo() یا ExtensionsManager#getCameraExtensionsControl() که به تازگی اضافه شده است، دریافت کنند. ( I28e1a )
  • ProcessCameraProvider.awaitInstance اضافه شد که نسخه معلق ProcessCameraProvider.getInstance ( Ib22b9 ) است
  • یک API PreviewView#getSensorToViewTransform() اضافه کنید. ماتریس تبدیل از مختصات سنسور دوربین به مختصات PreviewView را نشان می دهد. این می تواند برای تبدیل مختصات از یک UseCase به دیگری استفاده شود. به عنوان مثال، تبدیل مختصات اشیاء شناسایی شده در ImageAnalysis به PreviewView overlay. ( I947ab )
  • API camera-viewfinder-core را عمومی‌تر کنید تا بتوان از آن توسط camera-viewfinder و camera-viewfinder-compose استفاده کرد. ( I1e295 )
  • تابع getSurface به ViewfinderSurfaceRequest اضافه کنید. ( I781a0 )
  • camera-viewfinder-core در camera-viewfinder استفاده کنید و ViewfinderSurfaceRequest و CameraViewfinder منسوخ کنید. ( I6198c )
  • ZoomGestureDetector اضافه شد که حرکات مقیاس‌بندی را که به‌طور خاص برای فعالیت‌های نزدیک به زوم پیکربندی شده‌اند، تفسیر می‌کند. ( ایفافف )

رفع اشکال

  • مشکل انتخاب رزولوشن ImageAnalysis مربوط به تنظیم وضوح هدف پیش‌فرض تحلیلگر برطرف شد: وضوح هدف به اشتباه 640x480 نگه داشته شد، حتی اگر برنامه‌ها تنظیمات وضوح پیش‌فرض تحلیلگر متفاوتی را تنظیم کرده باشند. اگر برنامه‌ها با این مشکل مواجه شدند (1.3.0 ~ 1.3.2) و نمی‌توانند برای استفاده از نسخه‌های جدیدتر که حاوی راه‌حل هستند، ارتقا دهند، تنظیم مستقیم ResolutionSelector با وضوح ترجیحی و یک AspectRatioStrategy مطابق با ImageAnalysis UseCase می‌تواند این مشکل را حل کند. ( I81f72 , b/330091012 )
  • مشکلی را برطرف کرد که در صورت عدم موفقیت درخواست فعلی ممکن است درخواست takePicture در صف اجرا نشود. ( Ie0801 )
  • بررسی داده‌های JPEG نامعتبر را روی دستگاه‌های Vivo X60 و X60 Pro اعمال کنید. این می تواند مشکل تصویر غیرعادی بزرگ را در این دستگاه ها برطرف کند. ( I82247 , b/288828159 )
  • مشکل فراداده تصویر JPEG نادرست در دستگاه های Samsung A24 برطرف شد. با رفع این مشکل، CameraX می‌تواند با موفقیت تصویر JPEG را ذخیره کند، یا هنگام فراخوانی تابع ImageProxy.toBitmap() در دستگاه‌های A24 سامسونگ، اشیاء Bitmap صحیح را می‌توان برگرداند. ( I8d6eb , b/309005680 )
  • اگر تصویر گرفته شده بزرگتر از 10 مگابایت باشد، بررسی داده های JPEG نامعتبر را برای همه دستگاه های سامسونگ اعمال کنید. این می تواند مشکل iamge غیرعادی بزرگ را در دستگاه های سامسونگ برطرف کند. ( Ic2a65 , b/288828159 )
  • پشتیبانی ImageAnalysis در برنامه‌های افزودنی CameraX حذف شد زیرا بسیاری از برنامه‌های افزودنی OEM با ImageAnalysis کار نمی‌کنند و ممکن است مشکلات متناقضی ایجاد کنند. ( I2d926 )

نسخه 1.4.0-alpha04

24 ژانویه 2024

androidx.camera:camera-*:1.4.0-alpha04 منتشر شد. نسخه 1.4.0-alpha04 حاوی این commit ها است.

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

  • مصنوع جدید: جلوه‌های دوربین: کتابخانه‌ای برای اعمال جلوه‌های بلادرنگ در خروجی CameraX، از جمله Preview ، VideoCapture و/یا ImageCapture . این مصنوع شامل پیاده سازی های OpenGL از CameraEffect API است که خروجی دوربین را به طور موثر دستکاری می کند.
  • OverlayEffect : برای ترسیم همپوشانی با Canvas API Android. این به برنامه اجازه می دهد تا یک واترمارک اعمال کند یا اشیاء شناسایی شده را در خروجی های دوربین برجسته کند.
  • APIهای DynamicRange برای حالت استفاده پیش‌نمایش: اکنون می‌توان محدوده دینامیکی را مستقل از حالت استفاده از ویدئو، روی حالت استفاده پیش‌نمایش تنظیم کرد. این اجازه می دهد تا محدوده های دینامیکی HDR مانند HLG10 برای پیش نمایش به تنهایی. APIهای جدیدی نیز در CameraInfo در دسترس هستند تا بپرسید هر دوربین از کدام محدوده دینامیکی پشتیبانی می کند.

تغییرات API

  • ScreenFlashUiCompleter به ScreenFlashListener تغییر نام داد و ScreenFlashUiCompleter#getExpirationTimeMillis به پارامتر expirationTimeMillis ScreenFlash#apply منتقل شد. ( I13944 )
  • APIهای جدیدی اضافه شده‌اند تا امکان تنظیم محدوده دینامیکی در حالت استفاده از پیش‌نمایش، و پرس و جو محدوده‌های پویا پشتیبانی شده توسط هر دوربین را فراهم کنند. این اجازه می‌دهد تا محدوده‌های دینامیکی HDR، مانند HLG10، به تنهایی با کیس استفاده پیش‌نمایش مورد استفاده قرار گیرد، و دیگر نیازی به اتصال همزمان VideoCapture نیست. ( If25e3 )
  • تغییر نام getMirroring() به isMirroring() ( I47063 )
  • پشتیبانی از تخمین زمان تأخیر در CameraX اضافه شد. برنامه‌های افزودنی دوربین به برنامه‌ها اجازه می‌دهند از یک API استفاده کنند که تخمینی از مدت زمانی که عکس‌برداری طول می‌کشد ارائه می‌دهد. این برآورد شرایط محیط فعلی، وضعیت دوربین را در نظر می‌گیرد و شامل زمان صرف شده برای پردازش درخواست‌های ضبط چند فریمی به همراه هر زمان اضافی برای رمزگذاری بافرهای پردازش شده در صورت لزوم می‌شود. ( I05c3a )
  • تغییر نام ScreenFlashUiControl به ScreenFlash ، ScreenFlashUiControl#applyScreenFlashUi به ScreenFlash#apply ، ScreenFlashUiControl#clearScreenFlashUi به ScreenFlash#clear ، و اضافه شدن getScreenFlashUiApplyTimeoutSeconds متدهای exploitS SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS مستقیم. ( Iccdd0 )

رفع اشکال

  • رفع نشت حافظه که منجر به آزاد نشدن فعالیت‌ها یا قطعات در هنگام فعال شدن برنامه‌های افزودنی می‌شود ( I14215 )
  • مشکلی که getZoomRatio به اشتباه مقدار کاهش یافته را هنگام اعمال نسبت بزرگنمایی افزایش می دهد، برطرف شد. ( I4aa0d , b/317543616 )
  • ImageCapture#ScreenFlash#clear بلافاصله زمانی که ImageCapture غیرقابل اجرا است یا دوربین بسته است فراخوانی می‌شود، همچنین برخی از باگ‌ها را برطرف می‌کند که به دلیل عدم تکمیل عکس‌برداری در این سناریوها، هرگز فراخوانی نمی‌شود. ( If99f9 )
  • رفع خرابی زمانی که چرخه حیات قبل از تکمیل درخواست takePicture متوقف می شود ( Idf017 , b/306202751 )
  • مشکل سیاه شدن پیش‌نمایش دوربین با فعال کردن برنامه‌های افزودنی در برخی دستگاه‌ها برطرف شد ( I1ffd0 )
  • مدت زمان نادرست ضبط ویدیو در دستگاه های با استفاده از Snapdragon 778G SoC رفع شد. ( If6aa7 , b/316057919 )

نسخه 1.4.0-alpha03

13 دسامبر 2023

androidx.camera:camera-*:1.4.0-alpha03 منتشر شد. نسخه 1.4.0-alpha03 حاوی این commit ها است.

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

  • CameraInfo.mustPlayShutterSound اضافه شد تا اطلاعاتی در مورد اینکه آیا صدای شاتر باید مطابق با محدودیت های منطقه ای پخش شود یا خیر. ( Ifda84 )
  • OnImageCapturedCallback.onCaptureStarted و OnImageSavedCallback.onCaptureStarted برای اطلاع از زمانی که دوربین شروع به نمایش یک فریم کرده است اضافه شد. توصیه می شود در این مرحله صدای شاتر یا انیمیشن شاتر را پخش کنید. ( IC49b3 )
  • پشتیبانی از ویژگی فلاش صفحه در CameraX برای ضبط تصویر دوربین جلو اضافه شد. CameraX از مدیریت API سمت چارچوب مراقبت می کند و در صورت لزوم زمان بندی را با تغییرات رابط کاربری برنامه همگام می کند (به عنوان مثال، ماشه پیش گرفتن AE پس از تغییر رنگ/روشنایی صفحه نمایش برنامه). برنامه ها فقط باید پیاده سازی های جانبی UI خود را در رابط ScreenFlashUiControl ارائه شده به CameraX اضافه کنند. ( I8ae84 )
  • اضافه شدن ویژگی Screen Flash پشتیبانی از پیاده سازی سمت UI در CameraX. برنامه‌ها می‌توانند یک پیاده‌سازی اولیه ImageCapture.ScreenFlashUiControl را از PreviewView یا ScreenFlashView جدید اضافه شده دریافت کنند که نمای همپوشانی تک رنگ اضافه می‌کند و روشنایی صفحه را در طول گرفتن عکس با فلاش صفحه به حداکثر می‌رساند. ( I1810e )

تغییرات API

  • پشتیبانی از ویژگی‌های برنامه‌های افزودنی جدید (پست‌نما و پیشرفت فرآیند ضبط): افزودن API ImageCapture#getImageCaptureCapabilities() برای برنامه‌ها برای پرس‌وجو درباره قابلیت‌های پس‌نمایش و گرفتن پاسخ به تماس پیشرفت فرآیند. برنامه ها می توانند نمایش پست را با استفاده از ImageCapture.Builder#setPostviewEnabled() فعال کنند. اندازه postview را می توان با استفاده از ImageCapture.Builder#setPostviewResolutionSelector() انتخاب کرد. هنگام فراخوانی takePicture() ، onPostviewBitmapAvailable و onCaptureProcessProgressed را می‌توان در OnImageSavedCallback یا OnImageCapturedCallback پیاده‌سازی کرد تا در صورت پشتیبانی، اعلان‌های postview و پیشرفت فرآیند را دریافت کنند. ( I5cd88 )
  • APIهایی برای محاسبه تبدیل مختصات از حسگر به بافر فعلی، با پرچمی که نشان می‌دهد آیا سطح اطلاعات جهت‌گیری دوربین را دارد یا خیر. ( I59096 )
  • API را در معرض درخواست PreviewCapabitlity در Preview UseCase قرار دهید. ( Ie5b6c )
  • APIهایی برای پشتیبانی از کیفیت های بیشتر برای VideoCapture اضافه شده است. Recorder.Builder#setVideoCapabilitiesSource(int) را می توان با VIDEO_CAPABILITIES_SOURCE_CODEC_CAPABILITIES برای ایجاد یک نمونه Recorder استفاده کرد که از کیفیت های بیشتری نسبت به VIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILE پشتیبانی می کند. یک مورد معمول استفاده زمانی است که برنامه در تلاش برای ضبط ویدیوی UHD در صورت امکان است، اما CamcorderProfile دستگاه شامل تنظیمات UHD نیست، حتی اگر کدک قادر به ضبط ویدیوی UHD باشد. ( Iedbe2 , b/263961771 )
  • دریافت کننده/ تنظیم کننده فرمت خروجی ImageAnalysis به CameraController اضافه کنید. ( I9a96c , b/308240643 )

رفع اشکال

  • از دوربین 1.3.1 : عملکرد ProcessCameraProvider#bindToLifecycle() را بهبود بخشید. تغییر عمده بهینه سازی فرآیند شناسایی مناسب ترین ترکیب اندازه برای UseCases است. نتایج بهینه بر اساس ترکیبات خاص UseCase و تعداد اندازه های خروجی پشتیبانی شده برای دستگاه های مورد نظر متفاوت است. ( I454f2 )
  • هنگامی که برنامه‌های افزودنی فعال هستند، اجازه استفاده از VideoCapture را بدهید. ( I91f32 )
  • مشکل بزرگ عکس JPEG گرفته شده در دستگاه های سری A71 و M51 سامسونگ رفع شد. تصاویر JPEG گرفته شده حاوی داده های اضافی 0 در بخش داده های فشرده JFIF هستند. این باعث می شود که تصاویر گرفته شده اندازه فایل فوق العاده ای داشته باشند. آن داده‌های اضافی 0 حذف می‌شوند تا تصاویر گرفته‌شده اندازه فایل‌های تصویری معمولی داشته باشند. ( I01afc , b/288828159 )
  • پشتیبانی ImageAnalysis را در Pixels غیرفعال کنید تا از اشکالی در Pixel جلوگیری کنید که اندازه‌های غیرخالی پشتیبانی شده ImageAnalysis به‌طور تصادفی برمی‌گرداند. ( I7ec31 )
  • رفع مشکل عملکرد که در آن بارگیری CPU و مصرف انرژی با فعال کردن برنامه‌های افزودنی افزایش می‌یابد. ( Ibdccb )
  • اسنپدراگون 480 به CameraUseInconsistentTimebaseQuirk اضافه شد. این مشکل را در Android 12 برای دستگاه‌هایی که از این چیپست استفاده می‌کنند، برطرف می‌کند که در آن صدای ضبط‌شده با مدت زمانی که دستگاه در حالت تعلیق قرار دارد، جبران می‌شود. ( I58010 )

نسخه 1.4.0-alpha02

18 اکتبر 2023

androidx.camera:camera-*:1.4.0-alpha02 منتشر شد. نسخه 1.4.0-alpha02 شامل این تعهدات است.

تغییرات API

  • API را به setCameraOpenRetryMaxTimeoutInMillisWhileResuming تغییر دهید و این استدلال را تغییر نام دهید. ( I72370 )
  • اضافه کردن API برای پرس و جو از قابلیت دستگاه و فعال کردن تثبیت ویدیو/پیش نمایش. ( i87544 )
  • API را برای سفارشی کردن دوربین باز امتحان کردن زمان حداکثر زمان ارائه دهید. ( I0C642 )
  • منتشر شده ProcessCameraProvider.shutdownAsync به عنوان یک API آزمایش عمومی برای استفاده از ارائه دهنده دوربین فرآیند در سوئیت های آزمایشی که ممکن است نیاز به شروع کارآموز به روش های مختلف در بین تست ها داشته باشد. ( i9eca7 )
  • API ها را برای پیکربندی فیلمبرداری فیلمبرداری ، نرخ فریم و حالت آینه اضافه کنید. ( IFB8F7 )
  • کاهش OutputSize و جایگزین آن با ResolutionSelector . ResolutionSelector یک روش جامع تر برای انتخاب قطعنامه ها است و با API-Camera-Core سازگار است. ( I93ABD ، B/286801438 )

رفع اشکال

  • مشکل پیش نمایش سیاه در سامسونگ گلکسی S23 Ultra 5G هنگامی که پسوند Bokeh یا Face-Retouch با ImageAnalysis در دوربین عقب فعال می شود. ( i2e8b1 )
  • پیش نمایش ثابت و VideoCapture گسترده در Moto E5 Play. ( 73DCE2 )

نسخه 1.4.0-alpha01

20 سپتامبر 2023

androidx.camera:camera-*:1.4.0-alpha01 منتشر شده است. نسخه 1.4.0-alpha01 شامل این تعهدات است.

تغییرات API

  • هنگام ضبط ، API جدید را برای دسترسی به اطلاعات دامنه صوتی اضافه کنید. ( id4925 )

رفع اشکال

  • با اطمینان از ایجاد وقایع اولیه سازی و تخریب ، به ترتیب صحیح ، ثبات پسوندها را بهبود بخشید. ( ib3b8e )
  • خرابی پیکربندی جلسه ضبط ثابت برای بیش از ترکیب سطح پشتیبانی شده به دلیل اضافه کردن سطح تکرار اضافی در داخل. ( id718c )
  • مسئله تصویر JPEG بزرگ ضبط شده در دستگاه Vivo S16. تصاویر JPEG ضبط شده حاوی داده های بالشتک 0 در بخش داده فشرده شده JFIF است. این باعث می شود تصاویر ضبط شده اندازه پرونده بزرگ داشته باشند. این داده های بالشتک 0 redundant 0 حذف می شوند تا تصاویر ضبط شده دارای اندازه فایل تصویر عادی باشند. ( I79505 ، B/299069235 )
  • این مسئله را برطرف کرد که ImageAnalysis نمی تواند با ImageCapture و پیش نمایش همراه باشد وقتی برخی از حالت های پسوند در برخی از دستگاه ها فعال می شوند. هنگامی که برنامه ها در دسترس بودن ImageAnalysis از طریق ExtensionsManager#isImageAnalysisSupported() پرس و جو می کنند ، مقدار صحیح برمی گردد. ( i7d538 )
  • Javadoc را برای مطابقت با رفتار به روز کنید. به جای اینکه بلافاصله تکمیل شود ، #setZoomRatio ، #setLinearZoom و #enableTorch صبر کنید تا دوربین آماده شود. همچنین اطلاعاتی در مورد چگونگی به دست آوردن حداکثر FOV با API #takePicture اضافه شده است. ( I23588 )

نسخه 1.3

نسخه 1.3.4

12 ژوئن 2024

androidx.camera:camera-*:1.3.4 منتشر شده است. نسخه 1.3.4 شامل این تعهدات است.

رفع اشکال

  • مسئله ای را برطرف کرد که در آن getZoomRatio به طور نادرست هنگام استفاده از نسبت بزرگنمایی ، مقدار کاهش یافته را برگرداند. ( i4aa0d ، b/317543616 )
  • ثابت هنوز ضبط/ضربه زدن به فوکوس با استفاده از درخواست تکرار FPS/مقادیر حالت تثبیت کننده که ممکن است مجدداً جلسه ضبط ایجاد شود و باعث ایجاد مشکلات تأخیر یا یخبندان در برخی از دستگاه ها شود. ( i7dc0b )
  • این مسئله را رفع کرد که نرخ فریم هنگام فراخوانی setTargetFrameRate با FRAME_RATE_RANGE_UNSPECIFIED روی یک مقدار پایین تر تنظیم شده است. ( I78C61 )

نسخه 1.3.3

17 آوریل 2024

androidx.camera:camera-*:1.3.3 منتشر می شود. نسخه 1.3.3 شامل این تعهدات است.

رفع اشکال

  • مسئله انتخاب وضوح تصویر ImageAnalysis مربوط به تنظیم وضوح هدف پیش فرض آنالایزر: وضوح هدف به طور نادرست به عنوان 640x480 نگه داشته شد ، حتی اگر برنامه ها تنظیمات پیش فرض آنالایزر متفاوتی را تنظیم کرده باشند. اگر برنامه ها با این شماره (1.3.2 ~ 1.3.0) روبرو شوند و نمی توانند برای استفاده از نسخه های جدیدتر که حاوی راه حل هستند ، استفاده کنند ، مستقیماً با وضوح ResolutionSelector نظر را با وضوح مورد نظر تنظیم می کنند و یک AspectRatioStrategy تطبیق یافته با Usecase ImageAnalysis می تواند این مسئله را انجام دهد. ( i81f72 ، b/330091012 )

نسخه 1.3.2

6 مارس 2024

androidx.camera:camera-*:1.3.2 منتشر می شود. نسخه 1.3.2 شامل این تعهدات است.

رفع اشکال

  • مسئله ابرداده JPEG را در دستگاه های سامسونگ A24 برطرف کرد. اکنون Camerax تصاویر را به طور دقیق ذخیره می کند ، و عملکرد ImageProxy.toBitmap() اشیاء Bitmap درست را برمی گرداند. ( i8d6eb ، b/309005680 )
  • گزینه وضوح 9280x6944 را در دستگاه های Redmi Note 9 Pro به دلیل مشکلات حذف کرد. ( IA23DA )

نسخه 1.3.1

13 دسامبر 2023

androidx.camera:camera-*:1.3.1 منتشر شده است. نسخه 1.3.1 شامل این تعهدات است.

رفع اشکال

عملکرد ProcessCameraProvider#bindToLifecycle() را بهبود بخشید. تغییر عمده بهینه سازی فرایند شناسایی مناسب ترین ترکیبات اندازه برای UseCases است. نتایج بهینه بر اساس ترکیبات خاص UseCase و تعداد اندازه خروجی پشتیبانی شده برای دستگاه های هدف متفاوت است. ( i454f2 )

در اینجا برخی از نتایج مرجع برای سناریوهای مختلف آورده شده است:

  • چهار UseCases : Preview + ImageCapture + ImageAnalysis + VideoCapture

    • Google Pixel 7: تقریباً 430 ms تا 60 ms
    • سامسونگ Galaxy S23 Ultra: تقریباً 540 ms تا 45 ms
    • سامسونگ A53 5G: تقریباً 115 ms تا 70 ms
  • سه UseCases : Preview + ImageCapture + ImageAnalysis

    • Google Pixel 7: تقریباً 9 ms تا 7 ms
    • سامسونگ Galaxy S23 Ultra: تقریباً 6 ms تا 5 ms
    • سامسونگ A53 5G: تقریباً 32 میلی ثانیه تا 12 میلی ثانیه
  • Snapdragon 480 را به CameraUseInconsistentTimebaseQuirk اضافه کرد. این مسئله در Android 12 برای دستگاه هایی که از این چیپست استفاده می کنند ، در جایی که صدا در ضبط ها با میزان زمانی که دستگاه در حالت تعلیق قرار دارد جبران می شود. ( i58010 )

نسخه 1.3.0

18 اکتبر 2023

androidx.camera:camera-*:1.3.0 منتشر می شود. نسخه 1.3.0 شامل این تعهدات است.

تغییرات مهم از 1.2.0

نسخه 1.3.0-RC02

20 سپتامبر 2023

androidx.camera:camera-*:1.3.0-rc02 منتشر شد. نسخه 1.3.0-RC02 شامل این تعهدات است.

رفع اشکال

  • با اطمینان از ایجاد وقایع اولیه سازی و تخریب ، به ترتیب صحیح ، ثبات پسوندها را بهبود بخشید. این برخی از مشکلات پیش نمایش سیاه را هنگام تعویض حالت های افزودنی یا تغییر دوربین ها برطرف می کند. ( IDDAAC )
  • این مسئله را برطرف کرد که ImageAnalysis نمی تواند با ImageCapture و پیش نمایش همراه باشد وقتی برخی از حالت های پسوند در برخی از دستگاه ها فعال می شوند. هنگامی که برنامه ها در دسترس بودن ImageAnalysis از طریق ExtensionsManager#isImageAnalysisSupported() پرس و جو می کنند ، مقدار صحیح برمی گردد. ( i7d538 )
  • مسئله ای را که صوتی و فیلم ضبط شده ضبط شده از همگام سازی در هنگام فعال کردن حالت آینه کاری در Xiaomi Poco X3 NFC از همگام سازی خارج شده بود ، رفع کرد. ( I20B4C )

نسخه 1.3.0-RC01

23 آگوست 2023

androidx.camera:camera-*:1.3.0-rc01 منتشر شد. نسخه 1.3.0-RC01 شامل این تعهدات است.

تغییرات API

  • اضافه شده PendingRecording.asPersistentRecording برای اجازه دادن به ضبط به طور مداوم ضبط می شود در حالی که ضبط کننده VideoCapture که ضبط شده است به آن پیوست شده است. ( i517c6 )

رفع اشکال

  • هنگامی که یک جریان با هر دو VideoCapture و پیش نمایش به اشتراک گذاشته می شود ، یک تصادف را برطرف کنید. همچنین هنگام فعال شدن جریان ، یک صفحه سیاه را بر روی دستگاه های میراث برطرف کنید.
  • مسئله تصویر JPEG بزرگ ضبط شده در دستگاه های سری Samsung S7 (SM-G930T ، SM-G930V). تصاویر JPEG ضبط شده حاوی داده های بالشتک 0 در بخش داده فشرده شده JFIF است. این باعث می شود تصاویر ضبط شده اندازه پرونده بزرگ داشته باشند. این داده های بالشتک 0 redundant 0 حذف می شوند تا تصاویر ضبط شده دارای اندازه فایل تصویر عادی باشند. ( i407b0 ، b/288828159 )
  • مسئله تصویر JPEG بزرگ ضبط شده در سامسونگ S22 (SM-S901B ، SM-S901B/DS) و S22+ (SM-S906B). تصاویر JPEG ضبط شده حاوی داده های بالشتک 0 در بخش داده فشرده شده JFIF است. این امر باعث می شود تصاویر ضبط شده اندازه پرونده بزرگ در حدود 13 مگابایت در دستگاه S22 SM-S901B/DS داشته باشند. این داده های بالشتک 0 redundant 0 حذف می شوند تا تصاویر ضبط شده دارای اندازه فایل تصویر عادی باشند. ( i73be9 ، b/288828159 )
  • مسئله تصویر JPEG بزرگ ضبط شده در دستگاه های سری Samsung A5 ، A52 ، A70 و A72. تصاویر JPEG ضبط شده حاوی داده های بالشتک 0 در بخش داده فشرده شده JFIF است. این باعث می شود تصاویر ضبط شده اندازه پرونده شدید داشته باشند (سابق در حدود 32 مگابایت یا حتی 96 مگابایت). این داده های بالشتک 0 redundant 0 حذف می شوند تا تصاویر ضبط شده دارای اندازه فایل تصویر عادی باشند. ( i97C4d ، b/288828159 )
  • هنگام عکس گرفتن با برنامه های افزودنی فعال شده ، تصادف بومی را برطرف کرد ( I698F5 )

نسخه 1.3.0-beta02

26 جولای 2023

androidx.camera:camera-*:1.3.0-beta02 منتشر شد. نسخه 1.3.0-beta02 شامل این تعهدات است.

رفع اشکال

  • برای بهبود کیفیت ضبط در نور کم ، از مشعل به عنوان فلش برای انواع پیکسل 4 و 5 استفاده کنید ( I56FF5 ، B/280221967 )
  • مسئله تصویر JPEG بزرگ ضبط شده در دستگاه های سری Samsung A5 (2017). تصاویر JPEG ضبط شده حاوی داده های بالشتک 0 در بخش داده فشرده شده JFIF است. این باعث می شود تصاویر ضبط شده حدود 32 مگابایت اندازه پرونده داشته باشند. این داده های بالشتک 0 redundant 0 حذف می شوند تا تصاویر ضبط شده دارای اندازه فایل تصویر عادی باشند. ( I29837 ، b/288828159 )
  • تلاش مجدد ثابت در صورت عدم موفقیت در دستگاه های مشکل ساز که در CaptureFailedRetryQuirk ذکر شده است ، به درستی تحریک نمی شود. ( i7b589 )

نسخه 1.3.0-beta01

21 ژوئن 2023

androidx.camera:camera-*:1.3.0-beta01 منتشر شد. نسخه 1.3.0-beta01 شامل این تعهدات است.

تغییرات API

  • نام ResolutionSelector.Builder#setHighResolutionEnabledFlag(int) نام setAllowedResolutionMode PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION تغییر ON داد ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE . ( if84e8 )
  • حذف شده API ImageAnalysis.setTargetRotationDegrees(int) ، ImageCapture.setTargetRotationDegrees(int) و VideoCapture.setTargetRotationDegrees(int) . ( id8e77 )
  • کلاس DynamicRange دامنه پویا از تصاویر را تنظیم می کند. این می تواند برای انتخاب قالبهای دامنه پویا بالا به عنوان خروجی VideoCapture از طریق VideoCapture.Builder#setDynamicRange() استفاده شود. ( IB0377 )
  • یک API isImageAnalysisSupported به ExtensionsManager اضافه شده است که برنامه ها می توانند تعیین کنند که آیا یک مورد استفاده ImageAnalysis می تواند به همراه پیش نمایش و ImageCapture در هنگام فعال شدن برنامه ها محدود شود. ( i1bc63 )
  • کلاس جدید VideoCapabilities به دست آمده از Recorder می تواند برای پرس و جو از دامنه ها و خصوصیات پویا پشتیبانی شده برای ضبط ویدیویی در دستگاه استفاده شود. روشهای دریافتی QualitySelector getSupportedQualities() و روشهای isQualitySupported() در حال کاهش است. لطفاً به جای آن از روشهای VideoCapabilities getSupportedQualities() و isQualitySupported() استفاده کنید. ( I04014 )
  • CameraController#setVideoCaptureTargetQuality() به setVideoCaptureQualitySelector تغییر نام داده می شود و Argurance QualitySelector می گیرد ، که انعطاف پذیری بیشتری را برای تنظیم کیفیت فیلم فراهم می کند. CameraController#getVideoCaptureTargetQuality() بر این اساس به getVideoCaptureQualitySelector تغییر یافته است. ( i520ed )
  • حاشیه نویسی تجربی را برای ویژگی های ویدیویی حذف کرد. ویژگی های ویدئویی اکنون پایدار هستند. ( i1a113 )

رفع اشکال

  • برای بهبود سرعت و کیفیت تصویر ضبط شده در نور کم ، از مشعل به عنوان فلاش در مدل های SMSUNG SM-A320 استفاده کنید. ( i6a022 ، b/286190938 )
  • پشتیبانی از فرمت ImageFormat.JPEG برای ImageProxy.toBitmap() اضافه کنید. اگر آرایه بایت jpeg قابل رمزگشایی نباشد ، یک UnsupportedOperationException پشتیبانی می شود. ( i81958 ، b/282057603 )

نسخه 1.3.0-alpha07

24 مه 2023

androidx.camera:camera-*:1.3.0-alpha07 منتشر شده است. نسخه 1.3.0-alpha07 شامل این تعهدات است.

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

  • API جدید VideoCapture.Builder# setTargetFrameRate(Range) اجازه می دهد تا ضبط های ویدیویی علاوه بر پیش فرض دستگاه ، در سایر نرخ های فریم ضبط شوند. نرخ فریم موجود برای ضبط ها را می توان از طریق API جدید CameraInfo#getSupportedFrameRates() پرسید.

تغییرات API

  • تغییر ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF / ON onstants to ALLOWED_RESOLUTIONS_NORMAL / SLOW و نام کاربری سازنده setHighResolutionEnabledFlag را به setAllowedResolutionMode تغییر نام داد. ( IAE817 )
  • CameraInfo#getSupportedFrameRateRanges() اکنون Set ای را به جای یک List باز می گرداند تا بهتر نشان دهد که دامنه ها بدون هماهنگی هستند. ( I02F43 )
  • برای رسیدگی به خطاهای غیرقابل برگشت ، شنونده خطا را به CameraEffect اضافه کنید ( ICE471 )
  • برای آزمایش بهتر ، سازنده عمومی را در ResolutionInfo اضافه کنید ( IF6D1C )
  • یک API UseCase.snapToSurfaceRotation(int) برای جایگزینی استفاده از setTargetRotationDegrees و تخریب api ImageAnalysis.setTargetRotationDegrees(int) ، ImageCapture.setTargetRotationDegrees(int) و VideoCapture.setTargetRotationDegrees(int) ارائه می دهد. ( IA9010 )
  • Preview#getTargetFrameRate and Preview.Builder#setTargetFrameRate قادر به تنظیم و بازیابی نرخ فریم هدف برای مورد استفاده پیش نمایش ( IF4F22 )
  • VideoRecordEvent.Finalize اکنون با خطای خطا در هنگام متوقف شدن شیء Recording به دلیل جمع آوری زباله ، با کد خطا ERROR_RECORDING_GARBAGE_COLLECTED تکمیل می شود. ( IBA974 )

رفع اشکال

  • ثابت NullPointerException هنگامی که اندازه خروجی ذخیره شده در StreamConfigurationMapCompat تهی است. ( IDF124 ، B/282025204 )
  • این مسئله را برطرف کرد که Preview.setSurfaceProvider(null) پیش نمایش را در پسوند مکث نمی کند ( IA903E )
  • مسئله ای را برطرف کرد که در هنگام ConcurrentModificationException در هنگام باز شدن دوربین ، در هنگام باز شدن VideoCapture پرتاب می شود. ( IC8AC4 )

نسخه 1.3.0-alpha06

19 آوریل 2023

androidx.camera:camera-*:1.3.0-alpha06 منتشر شد. نسخه 1.3.0-alpha06 شامل این تعهدات است.

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

  • دوربین همزمان یک ویژگی جدید است که از Android 11 معرفی شده است ، که از پخش همزمان دستگاه های دوربین پشتیبانی می کند ، به عنوان مثال ، به یک دستگاه اجازه می دهد تا دوربین های جلو و عقب همزمان کار کند. Camerax در حال حاضر فقط از دوربین های همزمان دوگانه پشتیبانی می کند ، که به دو دوربین امکان پذیر است ، در همان زمان ، با حداکثر دو {Link Usecase} S برای هر یک. وضوح حداکثر 720p یا 1440p است ، جزئیات بیشتر در لینک زیر ، به فیلمبردار#getConcurrentCameraids مراجعه کنید ()
  • معرفی API ResolutionSelector جدید که ویژگی های زیر را در بر می گیرد:
    • برنامه ها می توانند استراتژی های نسبت ابعاد و وضوح را برای انتخاب بهترین وضوح برای نیازهای خود مشخص کنند.
    • پارامترهای اندازه و نسبت ابعاد در مختصات سنسور دستگاه دوربین بیان شده است.
    • برنامه ها می توانند یک فیلتر با وضوح سفارشی را برای ترتیب اندازه های پشتیبانی شده به ترتیب مورد نظر پیاده سازی کنند.
    • برنامه ها همچنین می توانند ضبط با وضوح بالا را برای به دست آوردن تصاویر با وضوح بالاتر امکان پذیر کنند. با این حال ، لطفاً توجه داشته باشید که استفاده از وضوح بالا ممکن است منجر به زمان ضبط کندتر شود.
    • اضافه شده API های آینه کاری VideoCapture . فیلم های ضبط شده توسط VideoCapture به طور پیش فرض آینه نمی شوند. با این حال ، پیش نمایش دوربین به طور پیش فرض روی دوربین جلو آینه می شود. API های آینه کاری VideoCapture امکان استفاده از پیش نمایش دوربین را هنگام استفاده از دوربین جلو امکان پذیر می کنند. سه MirrorMode ، OFF ، ON و ON_FRONT_ONLY وجود دارد. برای تراز کردن با پیش نمایش دوربین ، توصیه می شود از ON_FRONT_ONLY استفاده کنید ، به این معنی که آینه کاری برای دوربین عقب فعال نیست بلکه برای دوربین جلو فعال است.

تغییرات API

  • در معرض ResolutionSelector جدید API. برنامه ها می توانند استراتژی های نسبت ابعاد و وضوح را با قوانین بازپرداخت یا فیلتر وضوح سفارشی مشخص کنند تا نتایج مطلوب را بدست آورند. برنامه ها می توانند یک پرچم را برای فعال کردن ضبط با وضوح بالا مشخص کنند. این به Camerax اجازه می دهد تا هنگام گرفتن عکس یا فیلم ، قطعنامه های بالاتر را انتخاب کند. با این حال ، لطفاً توجه داشته باشید که استفاده از وضوح بالا ممکن است منجر به زمان ضبط کندتر شود. ( ibed95 )
  • دامنه های FPS که توسط الگوریتم AE پشتیبانی می شوند ، اکنون می توانند از طریق CameraInfo#getSupportedFrameRateRanges() پرسیده شوند. ( IAA67F )
  • نام همه روشهای نرخ فریم را در استفاده از "Framerate" تلفیق کنید. تصحیح اشتباه Javadoc در VideoCapture#getTargetFrameRate() ( I83304 )
  • میراث setTargetAspectRatio و API setTargetResolution را کاهش داد. لطفاً به جای آن از API ResolutionSelector جدید استفاده کنید. ( i542c3 )
  • اضافه شده API های عمومی برای دوربین دوتایی همزمان ، از جمله
    1. List<List<CameraInfo>> getAvailableConcurrentCameraInfos()
    2. ConcurrentCamera bindToLifecycle(@NonNull ConcurrentCameraConfig concurrentCameraConfig)
    3. boolean isConcurrentCameraModeOn() و ConcurrentCameraConfig ، SingleCameraConfig و ConcurrentCamera ( IAB1C1 )
  • ImageProcessor.Response#getOutputImage nonnull ( IB9C60 )
  • اضافه شده API های آینه کاری VideoCapture ، از جمله VideoCapture.Builder.setMirrorMode(int) و VideoCapture.getMirrorMode() . API ها برای برنامه های کاربردی مفید هستند که ضبط ویدیو با رفتار پیش نمایش دوربین مشترک سازگار باشد ، یعنی پیش نمایش دوربین عقب آینه ای نیست اما پیش نمایش دوربین جلو آینه می شود. ( i713b6 ، b/194634656 )
  • اضافه کردن API setTargetFrameRate() در VideoCapture.Builder و getTargetFramerate() API در VideoCapture ( I109D4 )
  • SurfaceOutput در بسته شدن بسته و مخفی کنید و سازنده عمومی urfaceOutput.Event پنهان کنید. ( i60ea8 )
  • Recording.mute اضافه شده است. mute برای نادیده گرفتن پویا یا یک ضبط در پردازش. هنگام ضبط در پردازش به صراحت ، RecordingStats شامل AudioStats.AUDIO_STATE_MUTED خواهد بود. ( IE17FC )
  • ساخته شده #setEffects() پارامتر غیر تهی. برای پاکسازی اثرات یک API #clearEffects() اضافه کنید. برای حذف جلوه ها ، برنامه باید با #clearEffects() تماس بگیرد. ( i4b4d9 )
  • یک سازنده دوم را برای ViewfinderSurfaceRequest.Builder اضافه کنید تا یک سازنده را برای سازنده کپی بگیرید ( I621A7 )

رفع اشکال

  • مسئله ای را برطرف کرد که برنامه هایی که API با استفاده از برنامه های افزودنی API می توانند هنگام بستن دوربین خراب شوند ( IB27E5 )
  • مسئله ای را برطرف کرد که در آن VideoCapture نمی تواند با دوربین جلو در برخی از دستگاه ها کار کند. به عنوان مثال ، در سامسونگ گلکسی S23 و شیائومی 2107113SG. ( ibec7e ، b/270656244 )
  • این مسئله را برطرف کرد که گرفتن عکس با استفاده از فایل در پوشه عمومی ذخیره سازی خارجی همیشه در اندروید 10 یا بالاتر شکست خواهد خورد. لطفاً توجه داشته باشید که در Android 10 ، گرفتن عکس با استفاده از فایل در پوشه عمومی ذخیره سازی خارجی همچنین نیاز به تنظیم requestLegacyExternalStorage به True در برچسب برنامه دارد. ( i11b2c )
  • رفع یک تصادف RejectedExecutionException در DefaultSurfaceProcessor . این تصادف ممکن است هنگامی اتفاق بیفتد که VideoCapture محدود شود و فعالیت مکث شود. ( IDB46a ، b/273713906 )

نسخه 1.3.0-alpha05

22 مارس 2023

androidx.camera:camera-*:1.3.0-alpha05 منتشر شد. نسخه 1.3.0-alpha05 شامل این تعهدات است.

تغییرات API

  • اضافه شده API های چرخش VideoCapture ، از جمله VideoCapture.Builder.setTargetRotation(int) ، VideoCapture.setTargetRotation(int) ، VideoCapture.setTargetRotationDegrees(int) و VideoCapture.getTargetRotation() . API ها برای برنامه هایی که جهت گیری دستگاه را قفل می کنند مفید هستند. ImageCapture.setTargetRotationDegrees(int) و ImageAnalysis.setTargetRotationDegrees(int) نیز اضافه می شوند. ( id3ffe ، b/205242781 )
  • اجازه دهید VIDEO_CAPTURE و PREVIEW|VIDEO_CAPTURE به عنوان هدف جلوه. جلوه هایی که VIDEO_CAPTURE را هدف قرار می دهد ، در USECase VideoCapture اعمال می شود. جلوه هایی که PREVIEW|VIDEO_CAPTURE قبل از کپی کردن برای پیش نمایش و جریان VideoCapture ، روی یک جریان مشترک اعمال می شود. ( IEE6F3 )

رفع اشکال

  • از دوربین 1.2.2 : مسئله ای را که در آن برنامه های کاربردی فیلمبرداری به درستی کار نمی کنند ، هنگامی که Proguard در برخی از دستگاه ها مانند Pixel ( I90AA2 ) فعال نیست ، رفع کرد.
  • رفع اشکال PreviewView که اگر برنامه به خودی خود جهت گیری صفحه را کنترل کند. پیش نمایش ممکن است پس از چرخش تحریف شود. این فقط در دستگاه های خاص اتفاق می افتد. می توان آن را در پیکسل A4 ، پیکسل 5 و پیکسل 6A تکثیر کرد. ( I14340 ، b/223488673 )

نسخه 1.3.0-alpha04

22 فوریه 2023

androidx.camera:camera-*:1.3.0-alpha04 منتشر شد. نسخه 1.3.0-alpha04 شامل این تعهدات است.

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

یک ویژگی جدید برای پشتیبانی از ترکیبات سطح قبلاً پشتیبانی نشده با به اشتراک گذاشتن یک جریان در چندین USECASES.

  • پیش از این ، هنگام اتصال "پیش نمایش ، فیلمبرداری ، ImageAnalysis" در سطح سخت افزار دوربین به طور کامل و پایین ، یا اتصال "پیش نمایش ، فیلمبرداری ، ImageCapture" در میراث سطح سخت افزار ، دوربین IllegalArgumentException پرتاب می کند.
  • رفتار جدید این است که اتصالات بدون پرتاب استثنائات کار می کنند. در عوض ، Camerax از OpenGL برای کپی کردن یک جریان مشترک در پیش نمایش و VideoCapture استفاده می کند.
  • به عنوان هزینه کپی بافر ، برنامه ممکن است شاهد افزایش تأخیر و مصرف برق باشد.

تغییرات API

  • API را برای تبدیل ImageProxy به Bitmap اضافه کنید. فرمت ImageProxy پشتیبانی شده ImageFormat.YUV_420_888 و PixelFormat.RGBA_8888 است. اگر این قالب نامعتبر باشد ، IllegalArgumentException است. ( IC7110 )
  • برای پشتیبانی از پیکربندی منظره یاب با استفاده از توابع تعلیق در کوتلین CoroutineCameraViewfinder را اضافه کنید. ( i657bc )
  • سازنده عمومی جدید را برای ViewfinderSurfaceRequest اضافه کنید. این انعطاف پذیری را فراهم می کند که کاربر نتواند CameraCharacteristics ارائه دهد. ( IE6549 )

رفع اشکال

  • تصادف پسوند را که در برخی از دستگاه های سامسونگ اتفاق می افتد هنگام مکث/از سرگیری سریع برنامه ، بر روی برخی از دستگاه های سامسونگ ثابت کرد ( IACA26 )

نسخه 1.3.0-alpha03

25 ژانویه 2023

androidx.camera:camera-*:1.3.0-alpha03 منتشر شد. نسخه 1.3.0-alpha03 شامل این تعهدات است.

تغییرات API

  • اضافه شده CameraInfo.getIntrinsicZoomRatio برای ارائه زاویه اطلاعات نسبت به دوربین پیش فرض. ( IB300C )
  • اضافه شده CameraInfo.getLensFacing برای ارائه اطلاعات با لنز. CameraSelector#LENS_FACING_EXTERNAL به عنوان یک ویژگی آزمایشی برای انتخاب دوربین های خارجی. ( ICAF3E )
  • #setEffect() را به CameraController اضافه کنید که امکان اضافه کردن جلوه ها به خروجی دوربین را فراهم می کند. ( i1d21f )
  • روش invalidate() را به SurfaceRequest اضافه کنید. ارائه دهنده سطح می تواند اطلاع دهد که سطح قبلاً ارائه شده دیگر معتبر نیست. ( IDC649 )
  • یک API ImageProcessor اضافه کنید. این رابط برای تزریق جلوه های پس از پردازش در خط لوله ImageCapture است. ( i575c6 )
  • اضافه شده API Recorder.Builder.setAspectRatio() که می تواند با QualitySelector برای پشتیبانی از قطعنامه های ویدیویی بیشتر ترکیب شود. ( i8a082 )
  • اضافه شده Recorder.Builder#setTargetVideoEncodingBitRate برای تنظیم ویدیوی هدف BitRate و Recorder#getTargetVideoEncodingBitRate برای دریافت ویدیوی هدف رمزگذاری Bitrate. ( i5984d )

رفع اشکال

  • ImageCapture ثابت در صورت عدم وجود واحد فلش و حالت فلش انجام نشد. ( i9e8b4 ، b/263391112 )
  • مسئله فساد تصویر JPEG ثابت در صورت نوشتن داده های موقعیت مکانی exif در برخی از دستگاه های Android 12 سامسونگ. ( IB7086 ، B/263747161 ، B/263289024 )
  • هنگام تنظیم مشعل/بزرگنمایی قبل از اجزای اولیه سازی دوربین ، به عنوان مثال فراخوانی CameraController#enableTorch ، عمل در انتظار ذخیره می شود و پس از شروع اولیه سازی ، ذخیره می شود. ( i11e92 ، b/264157663 )

نسخه 1.3.0-alpha02

7 دسامبر 2022

androidx.camera:camera-*:1.3.0-alpha02 منتشر شد. نسخه 1.3.0-alpha02 شامل این تعهدات است.

تغییرات API

  • یک API جدید برای استفاده از اثر پس از پردازش برای پیش نمایش خروجی اضافه کنید. ( IC17D5 )
  • تغییر نام به OutputOptions.getDurationLimit به OutputOptions.getDurationLimitMillis و OutputOptions.setDurationLimit to OutputOptions.setDurationLimitMillis . ( i91f0c )
  • کلاس AudioConfig را اضافه کنید تا هنگام ضبط فیلم ، تنظیمات مربوط به صدا را انجام دهد. حاشیه نویسی @RequiresPermission از توابع startRecording به AudioConfig منتقل می شود تا از درخواست های غیر ضروری برای مواردی که نیاز به صدا نیست ، جلوگیری شود. ( I28755 )
  • کلاسهای ابرداده ، OnVideoSavedCallback ، OutputFileOptions و OutputFileResults را حذف کنید که دیگر پس از استفاده از API ضبط ویدیوی جدید دیگر مورد استفاده قرار نمی گیرند. ( i38cd8 )
  • API ضبط ویدیوی جدید را اعمال کنید. روشهای getVideoCaptureTargetSize و setVideoCaptureTargetSize با روش getVideoCaptureTargetQuality جایگزین می شوند و به همین ترتیب روش های setVideoCaptureTargetQuality ، به عنوان setTargetResolution دیگر پشتیبانی نمی شود. ( i2a1d5 )

رفع اشکال

  • core.VideoCapture API را حذف کنید. ( i531e0 )
  • این مسئله را رفع کرد که پاسخ به تماس onError هنگام عکس گرفتن بدون اجازه ذخیره سازی فراخوانده نمی شود. ( i936db ، b/244807669 )
  • کیفیت و قابلیت اطمینان پسوند دوربین را بهبود بخشید. پسوندهای دوربین در دستگاه های موتورولا با استفاده از پسوندهای دوربین v1.1.0 و بالاتر به دلیل مشکلات مربوط به پشتیبانی بوکه ، ضبط تصویر و پیش نمایش از سر گرفته نمی شوند. ( id3ce3 )
  • تصادف بومی ثابت هنگام کشت ویدیویی از طریق ViewPort در دستگاه های میراث فعال می شود. ( i16b8a ، b/251357665 )

نسخه 1.3.0-alpha01

9 نوامبر 2022

androidx.camera:camera-*:1.3.0-alpha01 منتشر شده است. نسخه 1.3.0-alpha01 شامل این تعهدات است.

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

  • Camera-viewfinder به طور رسمی منتشر شده است. Camera-viewfinder یک ویجت منظره یاب پایه را فراهم می کند که می تواند خوراک دوربین را برای Camera2 نشان دهد. لطفاً برای مثال کد نمونه را بررسی کنید.

تغییرات API

  • اضافه شده OutputOptions.setDurationLimit برای ایجاد محدودیت مدت زمان فیلم. ضبط به طور خودکار در صورت فراتر از حد مدت زمان مشخص نهایی می شود. ( i902a0 )
  • اضافه کردن ضبط ویدیو خطای صوتی AudioStats.AUDIO_STATE_SOURCE_ERROR . ارسال شده در صورت عدم موفقیت تنظیم منبع صوتی یا برخی از خطا. ( i37410 )

رفع اشکال

  • Quirk را اضافه کنید تا برخی از دستگاه های مشکل ساز هنگام مواجهه با خرابی های ضبط ، یک بار دوباره امتحان کنند. ( id4795 )
  • رفع PreviewView SurfaceView صفحه نمایش سیاه در ViewPager2 . به عنوان بخشی از FIX ، در صورت عدم تغییر وضوح درخواست شده ، PreviewView از SurfaceView خود استفاده مجدد می کند. ( IB3F27 )
  • هنگام استفاده از API ViewPort یا CameraController ، از برداشت ویدیویی (ویژگی WysiWyg) پشتیبانی کنید. ( IFBBA8 ، B/201085351 )
  • فیلم ثابت ضبط شده با دوربین جلو نمی تواند در Huawei P40 Lite ضبط کند. ( I87C57 ، B/250807400 )

نسخه 1.2

نسخه 1.2.3

24 مه 2023

androidx.camera:camera-*:1.2.3 منتشر می شود. نسخه 1.2.3 شامل این تعهدات است.

رفع اشکال

  • مسئله ای را برطرف کرد که در آن VideoCapture نمی تواند با دوربین جلو در برخی از دستگاه ها کار کند. به عنوان مثال ، در سامسونگ گلکسی S23 و شیائومی 2107113SG. ( ibec7e ، b/270656244 )

نسخه 1.2.2

22 مارس 2023

androidx.camera:camera-*:1.2.2 منتشر می شود. نسخه 1.2.2 شامل این تعهدات است.

رفع اشکال

  • مسئله ای که پسوندهای دوربین فیلمبرداری به درستی کار نمی کنند ، هنگامی که Proguard در برخی از دستگاه ها مانند Pixel ( I90AA2 ) فعال نیست ، به درستی کار نمی کند

نسخه 1.2.1

25 ژانویه 2023

androidx.camera:camera-*:1.2.1 منتشر شده است. نسخه 1.2.1 شامل این تعهدات است.

رفع اشکال

  • در صورت نوشتن داده های موقعیت مکانی exif در برخی از دستگاه های Android 12 سامسونگ ، مسئله فساد تصویر JPEG را برطرف کنید. ( b/263289024 )

نسخه 1.2.0

7 دسامبر 2022

androidx.camera:camera-*:1.2.0 منتشر می شود. نسخه 1.2.0 شامل این تعهدات است.

تغییرات مهم از 1.1.0

  • دوربین جدید Camera-Mlkit-Vision. دوربین فیلمبرداری را به راحتی با بسیاری از ویژگی های MLKIT ، از جمله اسکن بارکد ، تشخیص چهره ، تشخیص متن و غیره ادغام کنید. MLKitAnalyzer به عنوان API های جدید اضافه شده است.
  • API تاخیر جدید آزمایشی صفر. خط لوله ضبط را بهینه می کند تا ضمن حفظ کیفیت تصویر خوب ، تأخیر بهتری داشته باشد. هنگامی که حالت ضبط روی CAPTURE_MODE_ZERO_SHUTTER_LAG تنظیم شده است ، تأخیر بین دکمه شاتر کلیک می شود و انتظار می رود که تصویر به حداقل برسد ، در مقایسه با سایر حالت های ضبط. در دستگاه هایی که ZERO_SHUTTER_LAG پشتیبانی نمی کنند ، به CAPTURE_MODE_MINIMIZE_LATENCY بازگردد.
  • android.camera.core.VideoCapture را کاهش دهید.
  • اضافه شده setStreamUseCase() به عنوان API Camera2Interop عمومی.
  • نیاز به سطح API اضافه شده برای setOutputImageRotationEnabled .
  • تغییر نام نام توسط ImageAnalysis.Analyzer#getTargetResolutionOverride() به ImageAnalysis.Analyzer#getDefaultTargetResolution() .
  • API را برای تنظیم ابرداده موقعیت مکانی به ویدیوی ذخیره شده اضافه کرد.
  • فریمر کم ثابت هنگام VideoCapture
  • مسئله پیش نمایش سیاه را که اتفاق می افتد هنگامی که Bokeh Extension در برخی از دستگاه های سامسونگ فعال می شود ، رفع می کند و کاربر دوربین ها را تغییر می دهد.
  • ثابت Samsung J7 Prime (SM-G610M) و J7 (SM-J710MN) Preview/VideoCapture در دستگاه های API سطح 27.
  • از آنجا که این مسئله برطرف شده است ، این راهپیمایی را به صورت افقی از دوربین های جلو در Android T سامسونگ غیرفعال کرده است

نسخه 1.2.0-RC01

24 اکتبر 2022

androidx.camera:camera-*:1.2.0-rc01 منتشر شد. نسخه 1.2.0-RC01 شامل این تعهدات است.

تغییرات API

  • API setStreamUseCase برای OutputConfiguration اضافه کنید. کاربر می تواند مورد استفاده جریان را برای جلسه جریان مشخص کند ، و منطق داخلی Camerax را برای انتخاب مورد استفاده جریان به منظور بهینه سازی مطابق نیاز آنها انتخاب کند. ( IB1A95 )

رفع اشکال

  • ثابت Samsung J7 Prime (SM-G610M) و J7 (SM-J710MN) Preview/VideoCapture در دستگاه های API سطح 27. وضوح 1920x1080 باعث می شود تصاویر Preview/VideoCapture کشیده شود. راه حل اضافه شده برای انتخاب وضوح 1920x1080 برای پیش نمایش یا VideoCapture برای جلوگیری از مشکل کشیده شده تصویر. ( i0e04e )
  • فریمر کم ثابت هنگام استفاده از VideoCapture و پیش نمایش موارد استفاده از نسبت ابعاد 16: 9 در برخی از دستگاه های هواوی. ( IF8C88 ، B/223643510 )
  • خرابی باز دوربین ثابت هنگامی که SurfaceProvider پیش نمایش تنظیم نشده است. به عنوان بخشی از FIX ، پیش نمایش بدون مجموعه SurfaceProvider اکنون در جلسه ضبط دوربین پیکربندی نمی شود. ( i99681 )

نسخه 1.2.0-beta02

21 سپتامبر 2022

androidx.camera:camera-*:1.2.0-beta02 منتشر شد. نسخه 1.2.0-beta02 شامل این تعهدات است.

تغییرات API

  • نیاز به سطح API برای setOutputImageRotationEnabled ( i26e3e ، b/240993561 )

رفع اشکال

  • از آنجا که این مسئله برطرف شده است ، این راهپیمایی را به صورت افقی از دوربین های جلو در Android T سامسونگ غیرفعال کرده است. ( I05F69 )
  • مسئله پیش نمایش سیاه را که هنگام فعال کردن BOKEH در برخی از دستگاه های سامسونگ فعال می شود ، برطرف کرد و کاربر دوربین ها را تغییر می دهد. ( IF6168 )

نسخه 1.2.0-beta01

24 آگوست 2022

androidx.camera:camera-*:1.2.0-beta01 منتشر شد. نسخه 1.2.0-beta01 شامل این تعهدات است.

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

  • camera-mlkit-vision . دوربین فیلمبرداری را به راحتی با بسیاری از ویژگی های MLKIT ، از جمله اسکن بارکد ، تشخیص چهره ، تشخیص متن و غیره ادغام کنید. لطفاً کد نمونه را در اینجا پیدا کنید.
  • API تاخیر جدید آزمایشی صفر . خط لوله ضبط را بهینه می کند تا ضمن حفظ کیفیت تصویر خوب ، تأخیر بهتری داشته باشد. هنگامی که حالت ضبط روی Capture_Mode_Zero_Shutter_Lag تنظیم شده است ، تأخیر بین دکمه شاتر کلیک می شود و انتظار می رود که تصویر به حداقل برسد ، در مقایسه با سایر حالت های ضبط. در دستگاه هایی که از Zero_Shutter_Lag پشتیبانی نمی کنند ، به ضبط_مود_مینیمیز_لایت بازگردد.
  • ImageAnalysis.Analyzer و MLKitAnalyzer به عنوان API های رسمی.
  • API در معرض تنظیم ابرداده موقعیت مکانی به فیلم ذخیره شده.
  • تغییر نام ImageAnalysis.Analyzer#getTargetResolutionOverride() به ImageAnalysis.Analyzer#getDefaultTargetResolution() .

رفع اشکال

  • ALPS ثابت K61V1_BASIC_REF شماره ضبط تصویر. تصاویر JPEG ضبط شده از HAL دارای ابرداده EXIF ​​نادرست است. ابرداده exif دارای برچسب 0xFFD9 یا 0xFFDA نیست تا ExifInterface به درستی از ویژگی ها جدا کند. ضبط تصاویر با فرمت YUV و سپس فشرده سازی آنها به تصاویر خروجی JPEG برای حل این مسئله. ( i45abb )

نسخه 1.2.0-alpha04

27 جولای 2022

androidx.camera:camera-*:1.2.0-alpha04 منتشر شد. نسخه 1.2.0-alpha04 شامل این تعهدات است.

تغییرات API

  • تغییر نام ImageAnalysis.Analyzer#getTargetResolutionOverride() به ImageAnalysis.Analyzer#getDefaultTargetResolution() . این رفتار همچنین به گونه ای تغییر یافته است که مقدار برگشتی توسط این روش می تواند با ارزش ImageAnalysis#setTargetResolution() غلبه کند. ( if1d36 )
  • API در معرض تنظیم ابرداده موقعیت مکانی به فیلم ذخیره شده. یک شیء android.location.Location را می توان از طریق API جدید androidx.camera.video.OutputOptions.Builder.setLocation(Location) تنظیم کرد. ( i313a0 ، b/204197544 )

رفع اشکال

  • این مسئله را حل کنید تا با پیش نمایش Unbind عکس بگیرید ( IE70B6 ، B/235119898 )
  • سقوط ثابت در Recorder هنگام تلاش برای ضبط در حالی که منبع صوتی در دسترس نیست. ( i9f652 )

نسخه 1.2.0-alpha03

29 ژوئن 2022

androidx.camera:camera-*:1.2.0-alpha03 منتشر شد. نسخه 1.2.0-alpha03 شامل این تعهدات است.

تغییرات API

  • حاشیه نویسی تجربی را برای ImageAnalysis.Analyzer و MLKitAnalyzer حذف کرد. ( i0ff22 )

رفع اشکال

  • در صورت عدم لغو FocusMeteringAction ، قسمت AF را با کاذب isFocusSuccessful FALSE اضافه می کند و قسمت AF در مدت زمان همگرا نمی شود. ( IBC2E3 )
  • این مسئله را برطرف کنید تا با پیش نمایش Unbind عکس بگیرید ( I1D3A2 ، B/235119898 )
  • اجرای پیشرفته Extender را فعال کرده و نسخه پشتیبانی پشتیبانی Camerax را به 1.2 ( I92256 ) به روز کنید

نسخه 1.2.0-alpha02

1 ژوئن 2022

androidx.camera:camera-*:1.2.0-alpha02 منتشر شد. نسخه 1.2.0-alpha02 شامل این تعهدات است.

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

  • API LAG صفر-شتر را به عنوان آزمایشی در معرض دید قرار دهید.

تغییرات API

  • حالت ضبط جدید CAPTURE_MODE_ZERO_SHUTTER_LAG در ImageCapture اضافه کنید و isZslSupported در CameraInfo اضافه کنید تا از قابلیت دستگاه استفاده کنید. حالت CAPTURE_MODE_ZERO_SHUTTER_LAG قصد دارد حداقل تأخیر را برای ضبط فوری فراهم کند. این برنامه بر اساس یک بافر حلقه ای اجرا می شود ، که نتایج ضبط میانی را برای پردازش مجدد بعدی هنگامی که کاربر دکمه ها را برای گرفتن عکس فشار می دهد ، ذخیره می کند. اگر {Link VideoCapture} محدود شده یا حالت فلش خاموش نیست یا پسوند OEM روشن است ، این حالت به طور خودکار غیرفعال می شود. ( i9ae74 )
  • اضافه کردن روش ImageAnalysis.getBackgroundExecutor() ( ICC945 )

رفع اشکال

  • Fixed ImageCapture takePicture method turns torch off on the reported devices. ( Ib5eb5 , b/228272227 )
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic.( /Ia248a , b/231701345 )

Version 1.2.0-alpha01

18 مه 2022

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

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

  • New library camera-mlkit-vision is launched

رفع اشکال

  • Fixed QualitySelector fails to record a UHD video when a fallback strategy is enabled. The issue happens when VideoCapture is bound with ImageCapture and Preview on a FULL or higher hardware level camera device. A fallback strategy of QualitySelector causes VideoCapture incorrectly to get a FHD resolution. UHD resolution is actually supported for this use case combination and should be adopted. ( I0e788 , b/230651237 )
  • Fixed NullPointerException on ImageCapture.takePicture() . ( I92366 , b/230454568 , b/229766155 )
  • Fix async pause behavior of androidx.camera.video.Recorder ( Ia8ce8 )

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video Version 1.1.0

نسخه 1.1.0

29 ژوئن 2022

androidx.camera:camera-*:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
  • Introduced new public APIs and features which including:
  • Add the official camera-video library to support video capture use cases.
  • YUV to RGB conversion and rotation capability ( ImageAnalysis.Builder.setOutputImageRotationEnabled and setOutputImageFormat )
  • Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
  • Ensures CameraX works well in foldable devices by fixing some preview issues.
  • Added a CameraState API that will be exposed through CameraInfo.
  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras
  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions are enabled.
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not.
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis .
  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking pictures.
  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector .
  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options.
  • Added an experimental API for using CameraController with external image processing libraries. eg MLKit
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera
  • Promoted several experimental APIs to formal public APIs
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental.
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter() , CameraXConfig.Builder#setMinimumLoggingLevel() , CameraXconfig.Builder#setSchedulerHandler() , CameraXConfig#getAvailableCamerasLimiter() , CameraXConfig#getMinimumLoggingLevel() , CameraXConfig#getCameraExecutor() , CameraXConfig#getSchedulerHandler() ,
  • @ExperimentalCameraFilter APIs
  • experimental exposure compensation APIs.
  • Promoted the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection , ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport.
  • Promoted the ExperimentalUseCaseGroupLifecycle to formal public APIs.
  • Changes to the existing APIs
  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri .
  • ActiveRecording has been renamed to "Recording" to reduce verbosity.
  • Changed QualitySelector creator API to a list-based API

رفع اشکال

  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set.
  • Fixed codec configuration failed due to video recording is closing
  • Fixed stretched preview/video aspect ratio when recording at FHD
  • Fixed audio/video out of sync after pause and resume on some devices
  • Fixed the issue where flash is triggered during tap-to-focus ( startFocusAndMetering ) when flash mode is auto or always_on in low-light environment.

Version 1.1.0-rc02

1 ژوئن 2022

androidx.camera:camera-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

رفع اشکال

  • Fixed NullPointerException on ImageCapture.takePicture() . ( I92366 , b/230454568 , b/229766155 )
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic. ( Ia248a , b/231701345 )

Version 1.1.0-rc01

11 مه 2022

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

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

  • Release the first RC version for camera-video, camera-view, and camera-extension

رفع اشکال

  • Fixed an issue where the video codec wasn't released when VideoCapture<Recorder> was unbound, causing subsequent uses of VideoCapture<Recorder> to fail on recording with MediaCodec.CodecException , especially on API 21-22 devices. ( Ie7f68 )
  • Fix captured images of CameraExtensionsActivity do not be deleted in ImageCaptureTest

Version 1.1.0-beta03

6 آوریل 2022

androidx.camera:camera-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.

تغییرات API

  • Made CaptureRequestOptions constructor restricted. ( I261b6 )
  • Added an experimental API for using CameraController with external image processing libraries. eg MLKit ( I4ea71 )

رفع اشکال

  • Fixed the issue that preview becomes sideway in PreviewView when activity is not restarted after rotating devices in multi-window. ( I1ea36 , b/223488673 )
  • Fix a multi-window issue that when focus changes back to the app it fails to resume the camera when (1) other high priority app opens a different camera (2) the device is Samsung Android 12 devices. ( I7e9f2 )
  • Workaround included for devices that crash when checking availability of flash. These devices will not have torch available. ( If26a3 , b/216667482 )
  • Fix AbstractMethodError issue happened when apps use extensions and enable proguard. ( I7cbaf , b/222726805 )
  • Force disable bokeh extension mode on Motorola razr 5G device which will cause black preview screen issue. ( I35d49 )
  • Fixed audio/video out of sync after pause and resume on some Samsung devices pre-API 29. ( I64622 , b/202798609 , b/202798572 )
  • Fixed audio/video out of sync after pause and resume on Sony G3125. ( I2a1a5 , b/202799148 )
  • Fixed a crash when the Recorder encountered an InvalidConfigException . However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException . If the Recorder still cannot be configured, applications will receive error callback when it starts recording. ( I89c29 , b/213617227 )

External Contribution

  • updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration ( I3366d )

Version 1.1.0-beta02

23 فوریه 2022

androidx.camera:camera-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

تغییرات API

  • Add the ability to specify physical camera ID through Camera2Interop. ( I5aed8 )

رفع اشکال

  • Fixed the stretched preview issue on Oppo Find N ( I7d004 )
  • Fixed a Galaxy J7 Prime issue that the preview is distorted. ( I4c500 )
  • Use compatible bitrate to find video encoder. ( d969052 )

Version 1.1.0-beta01

26 ژانویه 2022

androidx.camera:camera-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

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

  • From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrix.

تغییرات API

  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options. ( Ifa07d )

رفع اشکال

  • Fixed the crash when recording the video on some pre-Android O(API 26) devices. ( I88fdf , b/212328261 )
  • Fixed the incorrect AF region issue when using cameraControl#startFocusAndMetering() on front lens-facing camera in Samsung devices ( Ifbf59 , b/210548792 )
  • Use torch as flash on Pixel 3a/Pixel 3a XL to improve the speed and the captured image quality in dark ( Ib12b6 , b/211474332 )
  • Enabled applications to resume the camera when camera is interrupted by other higher priority application in the multi-window mode and the focus changes back to the application. Please note that there could be some latency(1 second to 10 seconds or more) between focus changes and camera reopened due to some framework issue. ( I4d092 )

Version 1.1.0-alpha12

15 دسامبر 2021

androidx.camera:camera-*:1.1.0-alpha12 is released. Version 1.1.0-alpha12 contains these commits.

تغییرات API

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. ( I8e286 , b/204917951 )
  • The quality constants and fallback strategy constants of QualitySelector have been changed to be represented by class objects. For example, QualitySelector.QUALITY_HD is changed to Quality.HD , and QualitySelector.FALLBACK_STRATEGY_LOWER is changed to the instance returned by FallbackStrategy.lowerQualityOrHigherThan(Quality) . The API used to create QualitySelector has been changed to a list-based API. The new API QualitySelector.fromOrderedList(List<Quality>) will refer to the order of the input quality list instead of the order created by QualitySelector.Procedure . QualitySelector.Procedure class has been removed. ( I43343 )
  • PendingRecording.withEventListener() was removed and the event listener must now be passed to PendingRecording.start() . This event listener requirement is meant to encourage handling of asynchronous errors that are reported in the VideoRecordEvent.Finalize event. ( I1e71d )
  • ActiveRecording has been renamed to Recording to reduce verbosity. ( I77ceb )

رفع اشکال

  • Fixed the issue that captured photos in FLASH_AUTO mode is underexposed in dark conditions on Pixel 3a and Pixel 3a XL ( I13f19 , b/205373142 )
  • Always use latest display size to determine the preview Resolution . ( I4a694 )
  • Filtered out cameras which do not have REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE . Cameras with REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE have the minimal set of capabilities that every camera device supports. Camera without REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE might be a camera to support special functionality and does not support standard color output. CameraX can't support the Preview , ImageCapture , ImageAnalysis or VideoCapture use cases for those cameras. Therefore, those cameras should be filtered out to prevent incorrect usage. ( Ib8cda )
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. ( I27804 )
  • Smarter heuristics are now used to select encoder settings based on OEM specified profiles. ( Iaeef0 )
  • Fixed Preview will have interlaced color lines after start UHD video recording on Pixel1. ( I833c6 , b/205340278 )

Version 1.1.0-alpha11

17 نوامبر 2021

androidx.camera:camera-*:1.1.0-alpha11 is released. Version 1.1.0-alpha11 contains these commits.

تغییرات API

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )
  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

    Add getSensorToBufferTransformMatrix API in ImageInfo. The returned matrix is a mapping from sensor coordinates to buffer coordinates, which is, from the value of CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE to (0, 0, image.getWidth, image.getHeight) . The matrix can be used to map the coordinates from one {UseCase} to another. For example, mapping coordinates of the face detected with ImageAnalysis to Preview. ( I9ff1e )

  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking picture. ( I8dcf4 )

  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri. ( I16639 )

رفع اشکال

  • Fixed the issue where flash being triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment. ( Id4c11 )
  • Disabled HDR+ on Pixel 2 XL / Pixel 3 XL in MINIMIZE_LATENCY mode to reduce latency. ( Ib6270 , b/203505523 )

External Contribution

Version 1.1.0-alpha10

13 اکتبر 2021

androidx.camera:camera-*:1.1.0-alpha10 is released. Version 1.1.0-alpha10 contains these commits.

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

  • Released androidx.camera:camera-video:1.1.0-alpha10 as the first alpha version for Video officially. There are several known issues to be fixed in the later releases.

تغییرات API

  • Added @RequiresApi(21) annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )

رفع اشکال

  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( Ibec79 )

Version 1.1.0-alpha09

29 سپتامبر 2021

androidx.camera:camera-camera2:1.1.0-alpha09 , androidx.camera:camera-core:1.1.0-alpha09 , and androidx.camera:camera-lifecycle:1.1.0-alpha09 are released. Version 1.1.0-alpha09 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )

رفع اشکال

  • Fix the issue where the captured photos are blurred in MAXIMIZE_QUALITY mode. ( I173a9 , b/193823892 )
  • Fixed a Samsung Galaxy J5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( I3aab9 )
  • When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY , the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY , the JPEG compression quality will be 100. ( Ieb37c , b/142856426 )

Version 1.1.0-alpha08

18 آگوست 2021

androidx.camera:camera-camera2:1.1.0-alpha08 , androidx.camera:camera-core:1.1.0-alpha08 , and androidx.camera:camera-lifecycle:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.

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

  • Add setOutputImageFormat API for image analysis config. User can select ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 or ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888. By default, ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 will be selected. ( I7902d )

تغییرات API

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )

رفع اشکال

  • Fixed Preview screen is too bright on the Huawei P20 Lite. This problem only occurs when certain special Preview resolutions are used together with a large zoom in value. ( Idefce , b/192129158 )
  • Fixed an issue that flash is not working on some devices when setting flash mode to FLASH_MODE_ON shortly followed by taking pictures. ( Ieb49b )
  • Fixed the issue where Preview will halt for a while when taking pictures if VideoCapture, ImageCapture and Preview are bound. ( I56197 , b/193864120 )
  • Allows ImageAnalysis to select a resolution larger than 1080p. A LIMITED-level above device can support a RECORD size resolution for ImageAnalysis when it is bound together with Preview and ImageCapture. The trade-off is the selected resolution for the ImageCapture will also need to be a RECORD size resolution. To successfully select a RECORD size resolution for ImageAnalysis, a RECORD size target resolution should be set on both ImageCapture and ImageAnalysis. This indicates that the application clearly understands the trade-off and prefers the ImageAnalysis to have a larger resolution rather than the ImageCapture to have a MAXIMUM resolution. For the definitions of RECORD, MAXIMUM sizes and more details see https://developer.android.com/reference/android/hardware/camera2/CameraDevice#regular-capture. The RECORD size refers to the camera device's maximum supported recording resolution, as determined by CamcorderProfile. The MAXIMUM size refers to the camera device's maximum output resolution for that format or target from StreamConfigurationMap.getOutputSizes(int). ( I1ee97 , b/192911449 )
  • Add the Exif info to the captured image. ( I01ff0 , b/193342619 )
  • In ImageCapture, return the URI of the saved image if the saving location is File. ( Ib5b49 , b/149241379 )
  • Fixed an issue that captured images with flash is dark on many devices. ( I4e510 )

Version 1.1.0-alpha07

21 جولای 2021

androidx.camera:camera-camera2:1.1.0-alpha07 , androidx.camera:camera-core:1.1.0-alpha07 , and androidx.camera:camera-lifecycle:1.1.0-alpha07 are released. Version 1.1.0-alpha07 contains these commits.

رفع اشکال

  • Fixed a Samsung Galaxy Note 5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( If6871 )
  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set. ( I538bd , b/192017012 )

Version 1.1.0-alpha06

30 ژوئن 2021

androidx.camera:camera-camera2:1.1.0-alpha06 , androidx.camera:camera-core:1.1.0-alpha06 , and androidx.camera:camera-lifecycle:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

تغییرات API

  • Promote the experimental exposure compensation APIs for camera-core ( I08ee8 )
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not. ( Ib45ae , b/188606490 )
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis. ( I2b613 , b/188600718 )
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(). ( I2ade2 )
  • Exposed the CameraProvider interface to provide access to a set of cameras. ( I1a7b1 )
  • Promote the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection , ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport. ( I7cee8 )

Version 1.1.0-alpha05

2 ژوئن 2021

androidx.camera:camera-camera2:1.1.0-alpha05 , androidx.camera:camera-core:1.1.0-alpha05 , and androidx.camera:camera-lifecycle:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

تغییرات API

  • Removed Camera2CameraFilter class. Suggest to select camera by CameraFilter and retrieve CameraCharacteristics or other Camera2 related information through Camera2CameraInfo if needed. ( Ib887c )
  • ExperimentalCameraFilter APIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 )
  • Added camera state API that's exposed through CameraInfo#getCameraState() . ( Ia86b4 )
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera ( I77f9f )

رفع اشکال

  • Fixed the issue that ListenableFuture returned in setZoomRatio and setLinearZoom cannot complete on some android 11 devices ( I716d7 )
  • Speed up Camera switching and reduce the error happen rate of the camera device ( I34c99 )
  • Replaced ExperimentalUseCaseGroupLifecycle with ExperimentalUseCaseGroup. ( I3b2ef , b/159033688 )

Version 1.1.0-alpha04

21 آوریل 2021

androidx.camera:camera-camera2:1.1.0-alpha04 , androidx.camera:camera-core:1.1.0-alpha04 , and androidx.camera:camera-lifecycle:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

رفع اشکال

  • Fixed a memory leak caused by multiple threads concurrently accessing the same collection. The memory leak may cause the Activity or Fragment to be retained by a Preview instance. ( I7b4b8 )
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental . ( Iff226 )
  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )
  • Added a CameraState API that will be exposed through CameraInfo. ( I75392 )

Version 1.1.0-alpha03

24 مارس 2021

androidx.camera:camera-camera2:1.1.0-alpha03 , androidx.camera:camera-core:1.1.0-alpha03 , and androidx.camera:camera-lifecycle:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

رفع اشکال

  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions modes is enabled. ( I0d7b1 )
  • Fixed initialization failure on UMIDIGI BISON devices ( I57d9e , b/180818665 )
  • Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )

Version 1.1.0-alpha02

24 فوریه 2021

androidx.camera:camera-camera2:1.1.0-alpha02 , androidx.camera:camera-core:1.1.0-alpha02 , and androidx.camera:camera-lifecycle:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

تغییرات API

  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras, which are either all of the device's cameras, or those selected by the CameraSelector provided in CameraXConfig.Builder.setAvailableCamerasLimiter(CameraSelector) . ( Ieac08 )

رفع اشکال

  • CameraX now tries to force open a camera on the initial attempt, this may result in CameraX stealing the camera away from other camera clients when its app has a higher priority. ( Iab069 , b/175820568 )
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
  • Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )
  • Documentation updated to recommend against using ProcessCameraProvider.configureInstance(...) from library code. ( Ib8a9f )

Version 1.1.0-alpha01

27 ژانویه 2021

androidx.camera:camera-camera2:1.1.0-alpha01 , androidx.camera:camera-core:1.1.0-alpha01 , and androidx.camera:camera-lifecycle:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

رفع اشکال

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 )
  • Resources in libraries with no explicitly declared public resources (ex. via public.xml) are now private by default. ( Ia1dcc , b/170882230 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.2

نسخه 1.0.2

29 سپتامبر 2021

androidx.camera:camera-camera2:1.0.2 , androidx.camera:camera-core:1.0.2 , and androidx.camera:camera-lifecycle:1.0.2 are released. Version 1.0.2 contains these commits.

رفع اشکال

  • Fix the issue where the captured photos are blurred in MAXIMIZE_QUALITY mode. ( I173a9 , b/193823892 )
  • Fixed a issue that captured image with flash is dark on many devices. ( I4e510 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.1

نسخه 1.0.1

21 جولای 2021

androidx.camera:camera-camera2:1.0.1 , androidx.camera:camera-core:1.0.1 , and androidx.camera:camera-lifecycle:1.0.1 are released. Version 1.0.1 contains these commits.

رفع اشکال

  • Fixed the issue that the ListenableFuture returned in setZoomRatio and setLinearZoom cannot complete on some android 11 devices ( I716d7 )

  • Fixed the issue that the camera gets stuck at closing camera state on some devices and causes black preview. ( I34c99 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.0

نسخه 1.0.0

5 مه 2021

androidx.camera:camera-camera2:1.0.0 , androidx.camera:camera-core:1.0.0 , and androidx.camera:camera-lifecycle:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • CameraX supports Preview , ImageCapture , and Analysis
  • CameraX manages the camera lifecycle within an easy to use API
  • CameraX aims to provide a compatibility layer that fixes many issues in the Android Camera Ecosystem

مسائل شناخته شده

Version 1.0.0-rc05

21 آوریل 2021

androidx.camera:camera-camera2:1.0.0-rc05 , androidx.camera:camera-core:1.0.0-rc05 , and androidx.camera:camera-lifecycle:1.0.0-rc05 are released. Version 1.0.0-rc05 contains these commits.

رفع اشکال

  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )

Version 1.0.0-rc04

24 مارس 2021

androidx.camera:camera-camera2:1.0.0-rc04 , androidx.camera:camera-core:1.0.0-rc04 , and androidx.camera:camera-lifecycle:1.0.0-rc04 are released. Version 1.0.0-rc04 contains these commits.

رفع اشکال

Version 1.0.0-rc03

24 فوریه 2021

androidx.camera:camera-camera2:1.0.0-rc03 , androidx.camera:camera-core:1.0.0-rc03 , and androidx.camera:camera-lifecycle:1.0.0-rc03 are released. Version 1.0.0-rc03 contains these commits.

رفع اشکال

  • Fix format error in the document of ProcessCameraProvider#getInstance
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig.
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crash, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview.
  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
  • Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )

Version 1.0.0-rc02

27 ژانویه 2021

androidx.camera:camera-camera2:1.0.0-rc02 , androidx.camera:camera-core:1.0.0-rc02 , and androidx.camera:camera-lifecycle:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

رفع اشکال

  • Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( b/150506192 )
  • Limit number of camera reopen attempts. While attempting to recover from certains issues when opening the camera, CameraX will no longer attempt to reopen the camera indefinitely, instead it will stop after retrying for 10 seconds. I435d2

  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 )

Version 1.0.0-rc01

16 دسامبر 2020

androidx.camera:camera-camera2:1.0.0-rc01 , androidx.camera:camera-core:1.0.0-rc01 , and androidx.camera:camera-lifecycle:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

تغییرات API

  • Changed CameraFilter and Camera2Filter to take in CameraInfo. ( I6883d )
  • Added experimental class Camera2CameraControl to allow interoperating with Camera2 APIs dynamically. ( I45cf3 )
  • Renamed Camera2CameraInfo#fromCameraInfo to #from. ( Ia2bd6 )
  • Added an experimental setAvailableCamerasLimiter API to CameraXConfig to allow apps to optimize the initialization latency by avoiding initializing unused cameras. ( I6cf88 )
  • Added experimental method CameraXConfig.Builder#setMinimumLoggingLevel() to allow setting a minimum logging level for CameraX logs. When not set, it defaults to Log#DEBUG . ( Ic3245 )

رفع اشکال

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930V back-facing camera. ( I5aca5 , b/159831206 )
  • Fixed the issue that taking pictures doesn't receive results when flash is always/on and the environment is dark on Samsung SM-A716 devices. ( If98b2 , b/172036589 )
  • Fixed the issue that the Preview cannot be stopped by calling Preview.setSurfaceProvider(null) . ( I3ac18 )
  • Fixed orientation issue when capturing 4:3 images on some devices. ( I0e3fb , b/171492111 )

Camera Camera2, Core, & Lifecycle Version 1.0.0-beta12

11 نوامبر 2020

androidx.camera:camera-camera2:1.0.0-beta12 , androidx.camera:camera-core:1.0.0-beta12 , and androidx.camera:camera-lifecycle:1.0.0-beta12 are released. Version 1.0.0-beta12 contains these commits.

رفع اشکال

  • Disabled auto flash on Samsung A3 devices to fix the crash when taking a photo with auto flash AE mode on Samsung A3 devices. ( Ia5fe3 , b/157535165 )
  • Fixed an issue where the preview was stretched on Nexus 4 devices running Android L (API levels 21 and 22). ( I4d407 , b/158749159 )
  • OnImageCapturedCallback#onCaptureSuccess base class implementation no longer closes the image. This is for preventing unexpected behavior to developers. Developers should not rely on super.onCaptureSuccess to close the image. ( Ifbf9c )
  • The androidx variant of the Experimental annotation has been deprecated to provide parity with Kotlin. It has been replaced by the RequiresOptIn annotation, and the Java-facing linter has been updated to support both the new Kotlin annotation and the new androidx variant. ( I52495 , b/151331381 )

Camera-Camera2 Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-camera2:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

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

  • Supports android 11 CONTROL_ZOOM_RATIO API for zoom on android 11 or later devices which contains valid CONTROL_ZOOM_RATIO_RANGE . ( I62cc6 )

رفع اشکال

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
  • Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
  • Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is ProcessCameraProvider.bindToLifecycle() . ( Ia5411 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Core Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-core:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

New Features - Supports android 11 CONTROL_ZOOM_RATIO API for zoom on android 11 or later devices which contains valid CONTROL_ZOOM_RATIO_RANGE . ( I62cc6 )

رفع اشکال

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
  • Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is ProcessCameraProvider.bindToLifecycle() . ( Ia5411 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Core Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-core:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

رفع اشکال

  • Fix bug in validating file save destination for image capture ( I8c565 , b/167697553 )

Camera-Camera2 Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-camera2:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

رفع اشکال

Camera-Camera2 Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-camera2:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

تغییرات API

  • Instead of providing static methods, Camera2CameraInfo takes in a CameraInfo instance when created to retrieve Camera2 related information from. ( I5b844 )

رفع اشکال

  • Fixed target aspect ratio issue on tablet devices. A 16:9 size should be selected when the target aspect ratio is set as AspectRatio.RATIO_16_9 . ( Ib7fcf , b/151969438 )
  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( I89c8c , b/160524721 )
  • Added experimental interfaces for ExposureCompensation ( If96c7 )

Camera-Core Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-core:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

تغییرات API

  • fixed the bug where viewport is marked as non-null on UseCaseGroup. Developers should be able to create a viewport without setting a viewport. ( Ie3d2e )
  • Added experimental interfaces for ExposureCompensation ( If96c7 )
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. ( I21470 )

رفع اشکال

  • Fixed the issue that flash on some devices would not turn off. It happens when the flash mode is set to FLASH_MODE_ON to take a picture, and is changed to FLASH_MODE_OFF when the flash is fired. The symptom is like torch mode enabled. ( Ib4451 , b/162568128 )
  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
  • Fixed the activity/fragment leak when an activity/fragment context is passed to ProcessCameraProvider.getInstance(Context) .

مسائل شناخته شده

  • When ViewPort is set, the crop rect of ImageCapture might be incorrect on devices who rotate the image buffer in HAL. در نسخه بعدی این مشکل برطرف خواهد شد.

Camera-Camera2 Version 1.0.0-beta08

19 آگوست 2020

androidx.camera:camera-camera2:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

رفع اشکال

  • Optimized bindToLifecycle to run quickly on the main thread. ( I1d57e )
  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector. ( I400c1 )
  • Fixed auto-resolution aspect ratio size grouping issue that a 16:9 mod16 size (864x480) is selected when the target resolution setting is 2016x1080 and there is another 1920x1080 16:9 size supported. ( I53167 , b/159363774 )
  • Fix the CameraControl issue where it's unable to work by a race condition ( I2279f , b/152333890 , b/160714166 )

Camera-Core Version 1.0.0-beta08

19 آگوست 2020

androidx.camera:camera-core:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

تغییرات API

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector . ( I400c1 )

رفع اشکال

  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )
  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

Camera-Camera2 Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-camera2:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

رفع اشکال

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
  • Excluded some JPEG supported sizes that will cause WYSIWYG issue on some devices. ( Ib5128 )

Camera-Core Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-core:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

تغییرات API

  • Merge FIT_CENTER , FIT_START , and FIT_END fit style with FIT . FIT means that the returned crop rect will be the max possible sensor rect. ( Ia73c3 )
  • Preview's crop rect is configured by viewport. Only the area covered by the crop rect should be visible to end users. ( I142a4 )

رفع اشکال

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
  • Fixed the ConcurrentModificationException exception issue when unbinding use cases. ( I371c0 )

Camera-Camera2 Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-camera2:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

رفع اشکال

  • Fixed the issue where startFocusAndMetering fails to focus successfully on Samsung Galaxy S7. ( If3be7 , b/159039233 )
  • Fix the camera can't be closed after quit the app. ( I7a7b3 )
  • Fix repeated camera switching breaks preview when using SurfaceView implementation of PreviewView ( I920ce )
  • CameraControl#startFocusAndMetering will fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )

Camera-Core Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-core:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

رفع اشکال

  • CameraX can now be configured with ProcessCameraProvider#configureInstance() before calling ProcessCameraProvider#getInstance() . This allows for customization of the CameraXConfig without requiring implementing CameraXConfig.Provider in the app's Application class. ( Ia1a8d )
  • CameraControl#startFocusAndMetering will fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )

Camera-Camera2 Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-camera2:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

رفع اشکال

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException that will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )
  • Fixed the crash when calling startFocusAndMetering on devices that CONTROL_AF_STATE is null. ( Ife55e , b/157084254 )

Camera-Core Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-core:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

تغییرات API

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

رفع اشکال

  • Updated javadocs of setTargetResolution and setTargetRotation . ( Iae16f )

Camera-Camera2 Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-camera2:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

رفع اشکال

  • Allowed applications to set any camera2 capture request parameters via Camera2Interop without causing a crash. Please note that if there are issues that arise as a result of overriding parameters. Stability and behaviour are not guaranteed when overriding parameters using Camera2Interop. ( Ibe5a1 , b/149103700 )
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
  • Converted error log related to detached use case to a debug log on Camera2CameraImpl. ( I1a565 , b/154422490 )
  • Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound ( I0c455 , b/153249512 )
  • Fixed the issues where binding ImageCapture only: (1) Failed to take photos with MAX_QUALITY; (2) Generated bad Image quality because auto exposure does not work. ( I17782 , b/145326998 )
  • Improved reliability of re-opening camera when CameraX is disconnected by another process or codepath stealing the camera ( I1fbc3 , b/153714651 )

Camera-Core Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-core:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

تغییرات API

  • Adds an experimental API, CameraXConfig.Builder#setSchedulerHandler() for setting the handler used internally by the CameraX camera stack. This new API along with CameraXConfig.Builder#setCameraExecutor() should allow full control over the threads being used by the CameraX camera stack. ( I7bf32 , b/121160431 )

رفع اشکال

  • Fixes crash in ImageAnalysis where the ImageProxy is accessed after the ImageReaderProxy has been closed. This also makes it so that all ImageProxy received by the Analyzer must be closed before the ImageReaderProxy will be closed. ( I4b299 , b/145956416 , b/154155377 , b/156357269 )
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider() , PreviewView now internally retrieves it from the SurfaceRequest . ( If18f0 , b/154652477 )
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
  • Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
  • Fix issue with ImageAnalysis where multiple calls to setAnalyzer/clearAnalyzer resulted in the analyzer not receiving images to analyze. ( I6169f , b/151605317 , b/153514544 )
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound ( I0c455 , b/153249512 )
  • Fixed the issue that the first camera in the supported list from CameraManager is not always selected to use. ( I4c624 , b/153418028 )
  • Fixed intermittent crash caused by setting Preview.SurfaceProvider not releasing the previously requested surface. “java.lang.IllegalStateException: Camera surface session should only fail with request cancellation” ( I8e4e7 , b/155936225 )

Camera-Camera2 Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-camera2:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

رفع اشکال

  • Fixes to support the release of camera-core

Camera-Core Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-core:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

رفع اشکال

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCase s would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase .

Camera-Camera2 Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-camera2:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

رفع اشکال

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 )
  • Explicit ordering of CameraX dependencies within build.gradle is no longer required to use the default CameraX/Camera2 implementation. For cases where declaring strict dependencies is required, all CameraX dependencies can now be included in the build file. ( I46e88 )
  • Fixed the IllegalArgumentException issue happening on the devices where the display size is smaller than 640x480. ( Ife3f2 , b/150506192 )
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e )

Camera-Core Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-core:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

رفع اشکال

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 )
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e )
  • Fixed an issue where the Preview use case's capture session wasn't being updated when the preview surface changed after calling Preview.setSurfaceProvider() more than once.

Camera-Camera2 Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-camera2:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

رفع اشکال

  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) , and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )
  • Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using ImageCapture.setTargetRotation() . ( I474ea , b/148763432 )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )

Camera-Core Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-core:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

تغییرات API

  • Replaced the ListenableFuture on SurfaceRequest.provideSurface() with an Executor and Callback . This simplifies the API by no longer requiring handling of exceptions on provideSurface() and enforces that the provideSurface() callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. The SurfaceRequest.Result object is now used for tracking how a SurfaceRequest uses the provided Surface . ( I7854b )
  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )

رفع اشکال

  • Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using ImageCapture.setTargetRotation() . ( I474ea , b/148763432 )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )
  • Updated documentation for flash mode APIs to include possible values. ( I4a3ec )

Camera-Camera2 Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-camera2:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

رفع اشکال

  • Improved stability on INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY devices by ensuring Surface s are only retained for duration of use by Camera2. ( I9dac2 )
  • Fixed underexposed preview issue on LEGACY devices by adjusting CONTROL_AE_TARGET_FPS_RANGE properly. ( 1224638 )

Camera-Core Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-core:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

تغییرات API

  • Updated ImageCapture to allow saving images to Uri and OutputStream . Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. ( Ia3bec )
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider . SurfaceProvider s no longer require developers to create their own ListenableFuture , and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView . ( I20105 )
  • Added getTargetRotation() and getTargetName() to Preview . ( Iceee7 )
  • Added getTargetRotation() , getBackpressureStrategy() , and getImageQueueDepth() in ImageAnalysis . ( I9d6d9 )
  • Added getTargetRotation() and getCaptureMode() in ImageCapture() ( I5bc17 )
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )
  • Preview and ImageCapture classes are now marked final. ( I2500b )
  • API updated, with getZoomRatio() , getMaxZoomRatio() , getMinZoomRatio() , and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. ( Ib19fe )
  • Removed API fields OPTION_TARGET_CLASS and OPTION_TARGET_NAME from CameraXConfig as they are intended for internal library use only. Removed constructor for CameraXConfig.Builder . ( I96912 )
  • Removed requirement that app must extend Application in order to initialize CameraX. CameraX will now be initialized with a default Camera2 configuration as long as the camera-camera2 artifact is included in the application's build.gradle . ( I58ff5 ) ( b/146923574 )

Camera-Camera2 Version 1.0.0-alpha09

22 ژانویه 2020

androidx.camera:camera-camera2:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .

API changes

  • Add camera2 interop path for extracting a Camera2 camera ID. You can extract the camera ID from CameraInfo using Camera2CameraInfo.extractCameraId() . The following code sample shows how to use this:

    Camera camera = provider.bindToLifecycle(...);
    String cameraId =
        Camera2CameraInfo.extractCameraId(camera.getCameraInfo());
    

    The Camera2CameraInfo class requires the ExperimentalCamera2Interop markerClass.

Camera-Core Version 1.0.0-alpha09

22 ژانویه 2020

androidx.camera:camera-core:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .

API changes

  • The SurfaceOrientedMeteringPointFactory parameter useCaseForSurface was renamed to useCaseForAspectRatio and the reference documentation was expanded.
  • FocusMeteringAction.Builder.from() methods are replaced by the constructors FocusMeteringAction.Builder() .
  • Removed DisplayOrientedMeteringPointFactory(android.content.Context, androidx.camera.core.CameraSelector, float, float) . Applications should use the constructor that takes a Display parameter and pass in the current display.
  • Javadoc improvements for focus and metering APIs regarding MeteringMode and 3A Flags, and usage of Display parameter.
  • Expanded the reference documentation for setZoomRatio and setLinearZoom .

رفع اشکال

  • Fixed issues when closing then opening cameras resulting in "Precondition" check failure.
  • Fixed a ConcurrentModificationException that could occur when using torch and zoom APIs.
  • Fixed issue to now select resolutions closer to requested resolution when a mod16 dimensions size is available.
  • startFocusMetering and cancelFocusMetering APIs now behave as documented, with correct timing and potentially returning errors when they occur.
  • Fixed issue when a specific target resolution was requested with a crop aspect ratio on a device that doesn't support such sizes. Now, a non-cropped size of sufficient resolution to bound the original request will be selected when available.

Camera-Camera2 Version 1.0.0-alpha08

18 دسامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .

مسائل شناخته شده

  • Not all Camera2 capture request options work when using the Camera2 interop. If the requested option is not supported, the session fails to start and an error like this may occur: 09-09 14:04:13.643 10117 26020 26036 E AndroidRuntime: java.lang.IllegalArgumentException: Unsupported session configuration combination

رفع اشکال

  • Fixed an issue in which a preview black screen occurred after rotating or switching the camera for API Levels 21 and 22.

تغییرات API

  • Experimental : Added a camera2 interop path for extracting the Camera ID.

Camera-Core Version 1.0.0-alpha08

18 دسامبر 2019

androidx.camera:camera-core:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .

مسائل شناخته شده

  • Apps using the PreviewView or CameraView may have the wrong aspect ratio preview. This happens after pause or resume on some FULL devices, such as the Pixel2.

رفع اشکال

  • Updated the documentation for FocusMeteringAction and CameraControl .
  • Implemented TorchControl for enableTorch() and getTorchState() .

تغییرات API

  • Hid IntDefs and moved IntDef constants outside of the IntDef definition.
  • Moved rotationDegrees from class OnImageCaptureCallback to ImageInfo .
  • Moved rotationDegrees from class Analyzer to ImageInfo .

Camera-Camera2 Version 1.0.0-alpha07

4 دسامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-camera2 contains these commits

  • Camera2Config is now available for use with initializing and configuring a Camera2-based implementation for CameraX. More details on how to use this in initialization are in the camera-core section of the release notes.
  • The camera2 interop functionally is now marked as experimental and moved to a separate package, androidx.camera.camera2.interop.

Camera-Core Version 1.0.0-alpha07

4 دسامبر 2019

androidx.camera:camera-core:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-core contains these commits

Note that there are some substantial changes in this Alpha release as we prepare for Beta. We recommend you review the changes and share any feedback you may have on the CameraX Google group . For those developers using CameraX in apps that are on the Play store, we recommend waiting for the formal Beta release before upgrading the library within your applications.

API changes

  • Important : CameraX initialization has changed. Applications should implement CameraXConfig.Provider , and use the default Camera2Config provided by androidx.camera.camera2 . A typical usage is:

    import androidx.camera.camera2.Camera2Config
    import androidx.camera.core.CameraXConfig
    
    public class MyCameraXApplication : Application(),  CameraXConfig.Provider {
        override fun getCameraXConfig(): CameraXConfig {
                return Camera2Config.defaultConfig(this)
        }
    }
    
  • The CameraX class has been removed. The bindToLifecycle() , unbind() , unbindAll() , isBound() , and hasCamera() previously provided by the CameraX class call are now available via the ProcessCameraProvider .

  • A per-process instance of ProcessCameraProvider is obtained asynchronously using the static method ProcessCameraProvider.getInstance() , which returns a listenable future, which provides the ProcessCameraProvider on completion. Here it is shown in onCreate() for a typical usage. You can place calls to getInstance() later in the activity's lifecycle to defer initialization latency to a later time (such as when a user action opens a camera UI).

    import androidx.camera.lifecycle.ProcessCameraProvider
    import com.google.common.util.concurrent.ListenableFuture
    
    class MainActivity : AppCompatActivity() {
       private lateinit var cameraProviderFuture : ListenableFuture<ProcessCameraProvider>
       override fun onCreate(savedInstanceState: Bundle?) {
           cameraProviderFuture = ProcessCameraProvider.getInstance(this);
      }
    
  • A listener can be added to the ListenableFuture returned by getInstance() . This ensures the camera provider can be retrieved from the Future without blocking on Future.get()

    cameraProviderFuture.addListener(Runnable {
      val cameraProvider = cameraProviderFuture.get()
      cameraProvider.bindToLifecycle(...)
    }, ContextCompat.getMainExecutor(this))
    
  • Camera selection is now done by a camera selector, instead of per-use case

    val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
    
  • CameraProvider.bindToLifecycle is given the lifecycle owner, the camera selector, and use cases, which are then bound to the given lifecycle owner and run for the selected camera.

    cameraProvider.bindToLifecycle(this as LifecycleOwner,
           cameraSelector, preview, imageAnalysis)
    
  • Use case “Config” classes are removed. Instead, build use cases directly, setting options on each use case builder. به عنوان مثال:

    preview = Preview.Builder().setTargetAspectRatio(AspectRatio.RATIO_16_9).build()
    
  • The Preview use case has been updated to accept a surface created and managed by the application to ensure Android best practices. It is highly recommended to use the PreviewView view class provided in the camera-view package.

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • See documentation for attaching an app-managed surface. In these cases the app manages the lifecycle of the surface.

  • Important : The ImageAnalysis Analyzer method implementation must call image.close() on received images when finished using them. Otherwise, new images may not be received or the camera may stall, depending on back pressure setting. Refer to the reference docs for details.

  • ImageAnalysis ImageReaderMode is now changed to a backpressure strategy intdef .

  • ImageProxy.getImage() is marked as experimental. Applications should annotate usage for example via @androidx.camera.core.ExperimentalGetImage

  • The UIThread annotation requirement for the Analyzer has been removed.

  • The ImageAnalysis.clearAnalyzer() function is added for removing an analyzer.

  • Listeners with more than 1 method have been renamed to Callback:

    • ImageCapture.OnImageCapturedListener is now ImageCapture.OnImageCapturedCallback
    • ImageCapture.OnImageSavedListener is now ImageCapture.OnImageSavedCallback
    • VideoCapture.OnVideoSavedListener is now VideoCapture.OnVideoSavedCallback
  • Enums have changed to IntDef

  • Zoom controls have been added:

    • CameraControl.setLinearZoom()
    • CameraControl.setZoomRatio()
    • CameraInfo.getLinearZoom()
    • CameraInfo.getMaxZoomRatio()
    • CameraInfo.getZoomRatio()
  • CameraInfo.hasFlashUnit() is added to determine if flash/torch hardware is present.

  • CameraInfo.isFlashAvailable() has been removed. Torch overrides flash functionality. More detail is included in the reference documentation .

  • ImageCapture.Metadata fields are replaced by get/set/is accessors.

  • startFocusMetering and cancelFocusMetering now return ListenableFutures which represent the asynchronous operation of the call.

  • MeteringPoints are now functioning as handles to metering actions, and are produced by factories. Apps should use the existing factories rather than custom factories.

مسائل رفع شد

  • Fixed issue when taking a picture on resuming (after a previous pause had take pictures pending completion).
  • Known Issue: CameraControl.enableTorch() is functional but the returned ListenableFuture<Void> is always an immediate complete(success) future, even if there is no flash unit. Future versions will fix this to the final behavior: When there is no flash unit, enableTorch(true) fails immediately (won't send request to CaptureSession ), and TorchState remain Off.
  • Known Issue: startFocusAndMetering and cancelFocusAndMetering start and cancel focus metering, but return an immediately completed (success) future not representing the documented behavior. The FocusMeteringResult from ListenableFuture<FocusMeteringResult> CameraControl.startFocusAndMetering() is a fake result which isFocusSuccessful() and is always "false," differing from intended, documented behavior.
  • Known Issue: A metering point factory for use with PreviewView touch events is being developed. For now, apps connecting custom managed surfaces can use the existing metering point factories, and otherwise no touch focus functionality is available for PreviewView .

Camera-Camera2 and Camera-Core Version 1.0.0-alpha06

9 اکتبر 2019

androidx.camera:camera-camera2:1.0.0-alpha06 and androidx.camera:camera-core:1.0.0-alpha06 are released. These are the commits included in camera-camera2:1.0.0-alpha06 and these are the commits included in camera-core:1.0.0-alpha06 .

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

Changes to setting aspect ratios:

  • setTargetAspectRatioMode() was added and accepts an enum argument. This sets the Aspect Ratio Mode with options RATIO_4_3 or RATIO_16_9 instead of an arbitrary aspect ratio. This closer reflects the fact that only certain aspect ratios are provided from the camera, rather than any arbitrary ratio.
    • Currently, the only available ratios are 16:9 and 4:3. In the case of 1:1, only certain devices have this available from the camera, and then only at limited resolutions. Applications designing a 1:1 interface or processing should use the more flexible 16:9 or 4:3 choices and crop the display or process a subregion.
    • These aspect ratios are oriented to use the maximum sensor area.
  • getTargetAspectRatio() was added to use case config APIs, returning the aspect ratio the use case output is targeted for.
  • The method setTargetAspectRatio(Rational aspectRatio) has been changed for ImageCapture to setTargetAspectRatioCustom(Rational aspectRatio) . When set, the ImageCapture output crops accordingly.

Executor APIs

  • The following functions accept an executor parameter, which allows the app to control which executor the function runs on.
    • Preview.setOnPreviewOutputUpdateListener() API. If the executor is not present for that function, it executes on the main thread.
    • Preview.setOnPreviewOutputUpdateListener
    • FocusMeteringAction.Builder.setAutoFocusCallback
    • ImageAnalysis.setAnalyzer
    • ImageCapture.takePicture
    • CameraView.takePicture
    • CameraView.startRecording
    • VideoCapture.startRecording

CameraInfo added with check Flash Available and Sensor Rotation APIs

  • Added CameraInfo and a getCameraInfo method, which allows apps to check if a lens facing CameraInfo is available and if a flash is available on that camera. به عنوان مثال:

    try {
        CameraInfo cameraInfo = CameraX.getCameraInfo(currentCameraLensFacing);
        LiveData<Boolean> isFlashAvailable = cameraInfo.isFlashAvailable();
        flashToggle.setVisibility(isFlashAvailable.getValue() ? View.VISIBLE : View.INVISIBLE);
    } catch (CameraInfoUnavailableException e) {
        Log.w(TAG, "Cannot get flash available information", e);
        flashToggle.setVisibility(View.VISIBLE);
    }
    
  • CameraInfo.getSensorRotationDegrees() was added. It provides the camera sensor orientation relative to the device's natural orientation, or for convenience, relative to an orientation described by a Surface rotation (which describes an orientation relative to natural orientation).

API changes and bug fixes

  • Aspect Ratios: For each use case, applications should call only one of setTargetResolution() or setTargetAspectRatio() . Calling both on the same builder returns an error.
    • In general it's recommended to use setTargetAspectRatio() based on the application's UI design. Specific resolutions are based on the use case. For example, preview is near screen resolutions and image capture provides high resolution stills. See the automatic resolutions table for more information.
    • Use setTargetResolution() for more specific cases, such as when minimum (to save computation) or maximum resolutions (for processing details) are required.
  • Executor API: Removed the setCallbackHandler() call from use case configuration APIs. Instead, applications can set the executor as a parameter in various other APIs that set a callback.
  • Updated null annotations for various functions.
  • Fixed an issue that caused java.lang.IllegalStateException at Camera$StateCallback.onError to be thrown when opening the camera.
  • Fixed issue where resolutions would be selected that were too small (less than 640x480) when app is requesting larger or default resolutions resulting in a blocky or blurry preview image. Applications that specifically need smaller resolutions can explicitly request them.
  • Fixed an issue where the camera would show black screen (failed to start the camera) after returning from an intent that launched another camera application.
  • Fixed a bug that threw the following error when apps are repeatedly started or stopped; java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
  • Fixed the following error that occurs when disabling ImageAnalysis: java.lang.IllegalStateException: maxImages (4) has already been acquired, call #close before acquiring more.
  • Added additional tests for camera disconnect flow.
  • Improved test system robustness when running back-to-back camera tests.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha05

5 سپتامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha05 and androidx.camera:camera-core:1.0.0-alpha05 are released. These are the commits included in camera-camera2:1.0.0-alpha05 and these are the commits included camera-core:1.0.0-alpha05 .

  • API Change: Renamed use case error variables:

    • ImageCapture.UseCaseError is renamed ImageCapture.ImageCaptureError
    • VideoCapture.UseCaseError is renamed VideoCapture.VideoCaptureError
  • Added CameraControl API w/Tap-to-Focus APIs

    • Added API to get a CameraControl from CameraX for a camera, selected by lens facing:

      CameraX.getCameraControl(LensFacing lensFacing)

    • Added MeteringPointFactory , MeteringPoint , MeteringMode , and FocusMeteringAction to run Tap-to-Focus:

      MeteringPointFactory factory = new SensorOrientedMeteringPointFactory(width, height);
      MeteringPoint point = factory.createPoint(x, y);
      FocusMeteringAction action = FocusMeteringAction.Builder.from(point,
                                       MeteringMode.AF_ONLY)
          .addPoint(point2, MeteringMode.AE_ONLY) // could have many
          .setAutoFocusCallback(new OnAutoFocusListener(){
              public void onFocusCompleted(boolean isSuccess) {
              }
          })
          // auto calling cancelFocusAndMetering in 5 sec.
          .setAutoCancelDuration(5, TimeUnit.Second)
          .build();
      
    • Added API for CameraControl to start and cancel focus metering:

      getCameraControl(lensFacing).startFocusAndMetering(action); getCameraControl(lensFacing).cancelFocusAndMetering();

    • Added APIs for Metering Point Factories that assist translating tap coordinates to sensor coordinates, based on view classes:

      MeteringPointFactory factory = new TextureViewMeteringPointFactory(textureView); MeteringPointFactory factory = new DisplayOrientedMeteringPointFactory(context, lensFacing, viewWidth, viewHeight);

  • Enforce calling the following methods on the Main (UI) thread, throwing an IllegalStateException when they are not. Future versions will allow usage on other threads and ensure serialization.

    • CameraX.bindToLifecycle()
    • CameraX.unbind()
    • CameraX.unbindAll()
    • ImageAnalysis.setAnalyzer()
    • ImageAnalysis.getAnalyzer()
    • ImageAnalysis.removeAnalyzer()
    • Preview.removePreviewOutputListener()
    • Preview.getOnPreviewOutputUpdateListener()
    • Preview.setOnPreviewOutputUpdateListener()
  • Various config settings now accept null parameters and corresponding getters may return null.

  • Fixed issue when testing on emulators that do not support AF/AE/AWB settings.

  • Fixed crash bug on rotation while analyzing image.

  • Fixed bug where preview appears black on start (no camera data), after rotation or switching between front and back cameras.

  • Removed testing for multiple concurrent image analysis use cases. To ensure compatibility, applications should only attach a single image analysis use case.

  • Added initial robolectric tests for fake camera in camera-testing suite (WIP).

  • Camera2Inititalizer test removed, as its coverage was unclear/misleading.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha04

7 آگوست 2019

androidx.camera:camera-camera2:1.0.0-alpha04 and androidx.camera:camera-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits .

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

Changes to Aspect Ratio and Resolution selection

CameraX's goal is to successfully initialize a camera session. This means CameraX compromises on resolution/aspect ratios based on device capability, in order to start a capture session as its first goal, and so exact requests may not be honored. این ممکن است به دلیل:

  • Devices not supporting the requested resolution
  • Compatibility issues such as on LEGACY devices where certain resolutions must be used to operate correctly
  • On some devices, certain formats are only available at certain aspect ratios
  • A preference for a “nearest mod16” for JPEG or video encoding. See CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP

Although CameraX creates and manages the session, you should always check the returned image sizes on the use case output in your code and adjust accordingly.

Some changes have been made for setting resolutions and aspect ratios, intended to make the API more clear:

  • Preview use case is now considered to have a default 4:3 aspect ratio when none is set.
  • When CameraX internally considers changes to requested resolutions and aspect ratios based on device capability, it first tries to maintain the same aspect ratio (as determined by any of setTargetAspectRatio or setTargetResolution calls)
  • A “Nearest mod16” version of the resolution is considered as the same aspect ratio.

ImageAnalysis Non-Blocking Mode

  • The behaviour of ImageReaderMode.ACQUIRE_LATEST_IMAGE is now non-blocking. It acquires the latest image in the queue, but discards unused images continuously to allow the camera pipeline to avoid blocking.
  • The analyzer can hold a single image indefinitely without stalling the pipeline.
  • If the application provides an executor which then blocks, the ImageAnalysis use case blocks.
  • The default executor set internally behaves as a non-blocking executor.

رفع اشکال

  • Fixed timeout issues waiting for 3A convergence when capturing images on devices with no auto-focus, auto exposure, and auto-whitebalance
  • Fixed issue when rapidly taking pictures with ImageCapture. Fixes error: java.lang.IllegalStateException: maxImages (2) has already been acquired
  • Fixed issue when setLensFacing was not called for a use case, resulting in java.lang.IllegalArgumentException: Unable to get camera ID for use case .
  • Fixed issue where LEGACY device required specific aspect ratio as maximum JPEG resolution
  • Fixed issue when backgrounding the app while camera is opening
  • Fixed issue on API < 25, removing error checkAndUpdateEglState: invalid current EGLDisplay
  • Fixed issue when unbinding preview after enabling and starting extensions
  • Build artifacts for camera-view and camera-extensions are now published as alpha versions

Camera-Camera2 and Camera-Core Version 1.0.0-alpha03

2 جولای 2019

androidx.camera:camera-core:1.0.0-alpha03 and androidx.camera:camera-camera2:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits .

تغییرات API

  • Added javadoc clarification for “target” in setTarget configuration calls

Camera-Core

  • Fixed unconfigured Input/Output Surface crash on rapid open/close or bind/unbind
  • Move to new Futures implementations
  • Test fixes for more robust testing
  • Core integration test now shows capture time for photos
  • Developed internal compat class for Executors
  • Timing test app capture images waits for previous to complete & improved stability

برنامه های افزودنی

  • Added versioning checks
  • Additional test coverage - extension event callbacks
  • Improvements for internally corresponding image and meta-data
  • Fixes to mode switching in test app

Camera-Camera2 and Camera-Core Version 1.0.0-alpha02

5 ژوئن 2019

androidx.camera:camera-core:1.0.0-alpha02 and androidx.camera:camera-camera2:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits .

رفع اشکال

  • Fixed div by zero issue when using emulator
  • Fixed NullPointerException/Surface Abandoned error occurring on some devices when quickly taking photos while unbinding and rebinding use cases rapidly.
  • Fixed internal issue to ensure capture request updates affect all surfaces consistently
  • Stability improvements when restarting use cases in new app instances
  • Internal architecture changes to prepare for supporting executors in the API
  • Additional Javadoc clarifications on CameraX class and lifecycle management
  • Added instrumented testing for Antelope performance test app
  • Remove need for '-keepattributes Signature' in app Proguard config

Camera-Camera2 and Camera-Core 1.0.0-alpha01

7 مه 2019

androidx.camera:camera-core:1.0.0-alpha01 and androidx.camera:camera-camera2:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits .

Camera-Lifecycle Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

رفع اشکال

  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Lifecycle Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

رفع اشکال

Camera-Lifecycle Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

Camera-Lifecycle Version 1.0.0-beta08

19 آگوست 2020

androidx.camera:camera-lifecycle:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

رفع اشکال

  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

Camera-Lifecycle Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-lifecycle:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

Camera-Lifecycle Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-lifecycle:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • CameraX can now be configured with ProcessCameraProvider#configureInstance() before calling ProcessCameraProvider#getInstance(). This allows for customization of the CameraXConfig without requiring implementing CameraXConfig.Provider in the app's Application class. ( Ia1a8d )

Camera-Lifecycle Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-lifecycle:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

رفع اشکال

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

Camera-Lifecycle Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-lifecycle:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Camera-Lifecycle Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-lifecycle:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

رفع اشکال

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCase s would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase .
  • Fixes to support the release of camera-core

Camera-Lifecycle Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-lifecycle:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

رفع اشکال

  • Fixed documentation to note that when obtaining a ProcessCameraProvider during initialization, a default configuration is used and that extending Application is optional. ( I5e395 )

Camera-Lifecycle Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-lifecycle:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

رفع اشکال

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 and camera-core:1.0.0-beta02 artifacts.

Camera-Lifecycle Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-lifecycle:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

تغییرات API

  • Added @MainThread annotation to BindToLifecycle, unbind and unbindAll methods. ( I990d2 )

Camera-Lifecycle Version 1.0.0-alpha03

22 ژانویه 2020

androidx.camera:camera-lifecycle:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Lifecycle Version 1.0.0-alpha02

18 دسامبر 2019

androidx.camera:camera-lifecycle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .

Dependency changes

  • Updated to use androidx.camera:camera-core:1.0.0-alpha08 .

Camera-Lifecycle Version 1.0.0-alpha01

4 دسامبر 2019

androidx.camera:camera-lifecycle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 of camera-lifecycle contains these commits

API notes

  • The camera-lifecycle artifact is added, providing LifeCycleCameraProvider interface, and an implementation called ProcessCameraProvider which provides many of the functions of the previous CameraX class in core and is obtained via a getInstance() method.
  • Apps should include the camera-lifecycle library to use CameraX.
  • See notes in the camera-core section for how to perform initialization of CameraX using a ProcessCameraProvider .

Camera-Extensions and Camera-View Version 1.0.0

Version 1.0.0-alpha32

15 دسامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha32 and androidx.camera:camera-view:1.0.0-alpha32 are released. Version 1.0.0-alpha32 contains these commits.

تغییرات API

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. ( I8e286 , b/204917951 )
  • Update api files for camera-extensions artifact. ( If683a , b/161377155 )

رفع اشکال

  • Disallow the app to enable extension modes when binding VideoCapture . CameraX Extensions only support ImageCapture and Preview . The VideoCapture can't be supported yet. If the app binds VideoCapture and enables any extension mode, an IllegalArgumentException will be thrown. ( I0d87b )
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. ( I27804 )
  • Renamed ExtensionsManager#getInstance API as getInstanceAsync because it returns ListenableFuture . The Async suffix of the function name can clearly present that it is an async function. ( I279d2 )
  • Remove resolution parameter from the ExtensionsManager#getEstimatedCaptureLatencyRange API since users can't know which sizes are supported for the ImageCapture use case and can't distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter. ( I74bb2 )
  • Move CameraProvider parameter of ExtensionsManager functions to the getInstance() API. So that the users don't need to input the CameraProvider parameter each time when calling the ExtensionsManager functions. ( Ic7e48 )

Version 1.0.0-alpha31

17 نوامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha31 and androidx.camera:camera-view:1.0.0-alpha31 are released. Version 1.0.0-alpha31 contains these commits.

تغییرات API

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )

رفع اشکال

  • Fixed a crash when switching extensions mode quickly on certain devices. ( Iebbef )

Version 1.0.0-alpha30

13 اکتبر 2021

androidx.camera:camera-extensions:1.0.0-alpha30 and androidx.camera:camera-view:1.0.0-alpha30 are released. Version 1.0.0-alpha30 contains these commits.

تغییرات API

  • Added @RequiresApi(21) annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )

رفع اشکال

  • Fixed the AbstractMethodError issue which happens when proguard is enabled. ( Iae468 , b/201177844 )

Version 1.0.0-alpha29

29 سپتامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha29 and androidx.camera:camera-view:1.0.0-alpha29 are released. Version 1.0.0-alpha29 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )
  • remove RotationProvider#removeAllListeners() . Please use RotationProvider#removeListener(...) instead. ( Id9d4a )
  • Updated the RotationReceiver class: changed set/clear Listener to add/remove/removeAll, remove the setListener variation that uses the main thread by default and added annotation of methods. ( Ib1669 )

رفع اشکال

  • Renamed ExtensionMode#BEAUTY to FACE_RETOUCH to correctly present what is done by the extension mode. ( I61f54 , b/198515274 )
  • Fixed the issue that camera is closed unexpectedly when multiple CameraController and PreviewView are used in one Activity. ( Ibfd18 , b/197539358 )

Version 1.0.0-alpha28

18 آگوست 2021

androidx.camera:camera-extensions:1.0.0-alpha28 and androidx.camera:camera-view:1.0.0-alpha28 are released. Version 1.0.0-alpha28 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )
  • refactored RotationListener and renamed it to RotationProvider. It continues to provide the same feature with slightly different API. ( Idffc5 )
  • rename TAP_TO_FOCUS_UNSUCCESSFUL to TAP_TO_FOCUS_NOT_FOCUSED and TAP_TO_FOCUS_SUCCESSFUL to TAP_TO_FOCUS_FOCUSED. Made OutputSize final ( I099fa )

رفع اشکال

  • Removed deprecated <EffectName><UseCase>Extender classes, ExtensionsErrorListener and related ExtensionsManager APIs. ( I3b8c3 )

Version 1.0.0-alpha27

21 جولای 2021

androidx.camera:camera-extensions:1.0.0-alpha27 and androidx.camera:camera-view:1.0.0-alpha27 are released. Version 1.0.0-alpha27 contains these commits.

تغییرات API

  • Promoted the viewport API out of experimental. Remove the experimental annotation of the API. ( I717ea )
  • Renamed CoordinateTransform#getTransform to CoordinateTransform#transform and update JavaDoc ( I864ae )

رفع اشکال

  • Fixed PreviewView PERFORMANCE mode stretch issue when using it together with Compose UI. ( Ie1137 , b/183864890 )

Version 1.0.0-alpha26

30 ژوئن 2021

androidx.camera:camera-extensions:1.0.0-alpha26 and androidx.camera:camera-view:1.0.0-alpha26 are released. Version 1.0.0-alpha26 contains these commits.

تغییرات API

  • add a new method CameraController#getTapToFocusState() that exposes the latest tap-to-focus result. ( Iaccb0 )
  • adding more camera-core features to CameraController: getters/setters for target aspect ratio, target resolution, capture mode, CameraControl and custom executors. ( Iea8f2 )
  • add a RotationReceiver class that receives Surface rotation changes. This can be used to set the target rotation when the device is in fixed portrait/landscape mode. ( Ib278f )
  • Exposed new getEstimatedCaptureLatencyRange public APIs in ExtensionsManager class. ( I6a8ec )
  • Deprecated ExtensionsErrorListener. Currently, this interface is only used to monitor whether a Preview or ImageCapture is lacking when enabling extension modes. CameraX will automatically add an extra Preview or ImageCapture to make the extension functions work well. After that, no error will be reported via this interface. ( I47d9e )
  • Exposed new ExtensionsManager getInstance, isExtensionAvailable and getExtensionEnabledCameraSelector public APIs and deprecated old <EffectName><UseCase>Extender classes and related APIs. ( I329e6 )

Version 1.0.0-alpha25

2 ژوئن 2021

androidx.camera:camera-extensions:1.0.0-alpha25 and androidx.camera:camera-view:1.0.0-alpha25 are released. Version 1.0.0-alpha25 contains these commits.

تغییرات API

  • ExperimentalCameraFilter APIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 )
  • Add a utility that transforms coordinates between use cases. Example usage: transforming the coordinates detected in ImageAnalysis use case and highlight the detected object in preview. ( I63ab1 , b/137515129 )
  • Removed CameraView . CameraView has been replaced by CameraController . Please see the migration guide for how to migrate.: ( Id5005 )

رفع اشکال

  • Replaced ExperimentalUseCaseGroupLifecycle with ExperimentalUseCaseGroup . ( I3b2ef , b/159033688 )

Version 1.0.0-alpha24

21 آوریل 2021

androidx.camera:camera-extensions:1.0.0-alpha24 and androidx.camera:camera-view:1.0.0-alpha24 are released. Version 1.0.0-alpha24 contains these commits.

رفع اشکال

  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental . ( Iff226 )
  • Fixed the PreviewView stretched issue on Samsung J5 Prime ( Ib10b6 )

Camera Extensions & View Version 1.0.0-alpha23

24 مارس 2021

androidx.camera:camera-extensions:1.0.0-alpha23 and androidx.camera:camera-view:1.0.0-alpha23 are released. Version 1.0.0-alpha23 contains these commits.

تغییرات API

  • CameraView is being deprecated. Please use LifecycleCameraController instead. See the migration guide ( Idac2c )
  • Added FloatRange annotation to setLinearZoom() ( I69971 )

رفع اشکال

  • Pinned camera-view dependencies to rely on 1.0.0 artifacts. Depending on camera-view will not longer cause gradle's dependency resolution to automatically upgrade camera-core, camera-camera2 and camera-lifecycle to the latest 1.1.0 artifacts, though camera-view is still compatible with those artifacts if they are explicitly set to use 1.1.0. ( Ic8fa1 , b/181599852 )
  • Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )
  • Fixed the issue where if camera selector cannot be set before camera is initialized. ( Ic8bd0 )

Camera Extensions & View Version 1.0.0-alpha22

24 فوریه 2021

androidx.camera:camera-extensions:1.0.0-alpha22 and androidx.camera:camera-view:1.0.0-alpha22 are released. Version 1.0.0-alpha22 contains these commits.

تغییرات API

رفع اشکال

  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )

Camera Extensions & View Version 1.0.0-alpha21

27 ژانویه 2021

androidx.camera:camera-extensions:1.0.0-alpha21 and androidx.camera:camera-view:1.0.0-alpha21 are released. Version 1.0.0-alpha21 contains these commits.

Releasing to support other camera library artifacts.

Camera Extensions & View Version 1.0.0-alpha20

16 دسامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha20 and androidx.camera:camera-view:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions & Camera-View Version 1.0.0-alpha19

11 نوامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha19 and androidx.camera:camera-view:1.0.0-alpha19 are released. Version 1.0.0-alpha19 contains these commits.

رفع اشکال

  • @ExperimentalVideo annotation was introduced to camera-view. This annotation marks APIs which expose experimental video functionality which is subject to change as the features are fully developed. Any method using these APIs should use the @UseExperimental annotation with ExperimentalVideo as the markerClass . ( I6d729 )

Camera-Extensions Version 1.0.0-alpha18

14 اکتبر 2020

androidx.camera:camera-extensions:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

رفع اشکال

  • Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-View Version 1.0.0-alpha18

14 اکتبر 2020

androidx.camera:camera-view:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions Version 1.0.0-alpha17

23 سپتامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

رفع اشکال

Camera-View Version 1.0.0-alpha17

23 سپتامبر 2020

androidx.camera:camera-view:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

رفع اشکال

Camera-Extensions Version 1.0.0-alpha16

16 سپتامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

رفع اشکال

  • Added method in ExtensionsManager to get an Extensions object which is used to enable and query extensions on Camera instances ( I4fb7e )

Camera-View Version 1.0.0-alpha16

16 سپتامبر 2020

androidx.camera:camera-view:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

تغییرات API

  • Removed PreviewView#setDeviceRotationForRemoteDisplayMode() and PreviewView#getDeviceRotationForRemoteDisplayMode() . The two methods are for customizing preview rotation, when desired rotation is not display rotation, eg remote display. To handle the non-display preview rotation now, set the desired rotation with Preview#setTargetRotation() and the newly added PreviewView#getViewPort(targetRotation) . ( Ib62cc )
  • Renamed createSurfaceProvider() to getSurfaceProvider() . The method will always return the same instance of Preview.SurfaceProvider. ( Iff83c )

رفع اشکال

  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. ( I21470 )

مسائل شناخته شده

  • In PreviewView, OnClickListener#onClick() is not invoked when the end user clicks PreviewView. The touch event is mistakenly consumed by PreviewView#onTouchEvent(). The issue will be fixed in the next release.
  • The MeteringPoint obtained from PreviewView#getMeteringPointFactory() may be wrong if ViewPort is used with PreviewView.

Camera-Extensions Version 1.0.0-alpha15

19 آگوست 2020

androidx.camera:camera-extensions:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

رفع اشکال

  • The ExtensionsManager.init() method now takes in a Context as a parameter instead of having 0 args. ( Ife754 )
  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

    Camera-View Version 1.0.0-alpha15

    19 آگوست 2020

androidx.camera:camera-view:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

رفع اشکال

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector . ( I400c1 )
  • Removed TextureViewMeteringPointFactory . PreviewView provides a public API ( createMeteringPointFactory() ) to create a metering point factory regardless of whether it's using a TextureView or SurfaceView . ( Ide693 )
  • rename PreviewView's SURFACE_VIEW / TEXTURE_VIEW implementation modes to PERFORMANCE / COMPATIBLE . PERFORMANCE is the old SURFACE_VIEW mode, and COMPATIBLE is the old TEXTURE_VIEW mode. ( I0edc2 )
  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )

Camera-Extensions Version 1.0.0-alpha14

22 جولای 2020

androidx.camera:camera-extensions:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-View Version 1.0.0-alpha14

22 جولای 2020

androidx.camera:camera-view:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-Extensions Version 1.0.0-alpha13

24 ژوئن 2020

androidx.camera:camera-extensions:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

رفع اشکال

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

Camera-View Version 1.0.0-alpha13

24 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

رفع اشکال

  • CameraView no longer crashes with an IllegalArgumentException when binding to a LifecycleOwner whose Lifecycle transitions to a DESTROYED state shortly after being bound. Binding Lifecycles in a DESTROYED state will not attempt to open the camera. ( I7c2b8 )
  • PreviewView StreamState is now available through CameraView.getPreviewStreamState() ( I21a2b )

Camera-Extensions Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-extensions:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

رفع اشکال

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

Camera-View Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

رفع اشکال

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )

Camera-Extensions Version 1.0.0-alpha11

27 مه 2020

androidx.camera:camera-extensions:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

Camera-View Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

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

تغییرات API

رفع اشکال

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )

Camera-View Version 1.0.0-alpha11

27 مه 2020

androidx.camera:camera-view:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

تغییرات API

  • Add PreviewView#getPreviewStreamState API which allows apps to observe if preview is streaming or not. When the PreviewView is in TEXTURE_VIEW mode, the STREAMING state also guarantees the preview image is visible. ( Ic0906 , b/154652477 )
  • Added PreviewView#setDeviceRotationForRemoteDisplayMode() API to provide device rotation for transform calculations if the application is running in remote display mode. ( I59b95 , b/153514525 )

رفع اشکال

  • Fixed the preview distortion issue on FULL/LIMITED/LEVEL_3 cameras running android 7.0 and below. Forced use ImplementationMode#TEXTURE_VIEW mode when the android version is 7.0 or below. ( I83e30 , b/155085307 )
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider() , PreviewView now internally retrieves it from the SurfaceRequest . ( If18f0 , b/154652477 )
  • Fixed the VideoCapture's default aspect ratio to be 16:9 in CameraView. ( Ie6a7b , b/153237864 )
  • Fix PreviewView black screen issues when swiped out Preview fragment and then swiped back in ViewPager2. Also fixed the issue when removeView(previewview) and then addView(previewView) . ( Iab555 , b/149877652 , b/147354615 )
  • Update the CameraView#takePicture() API to allow saving images to Uri and OutputStream . Update the test app to use Uri as the canonical example. ( Ia2459 , b/153607583 )
  • You can set PreviewView's scale type from a XML layout by setting the ScaleType attribute. ( I08565 , b/153015659 )
  • CameraView.ScaleType has been removed. Instead, use PreviewView.ScaleType to set/get a scale type with CameraView. ( Ia8974 , b/153014831 )
  • Give PreviewView a background color by default if it doesn't already have one. This prevents content behind it from being visible before the preview stream starts. ( I09fad )

Camera-Extensions Version 1.0.0-alpha10

15 آوریل 2020

androidx.camera:camera-extensions:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

رفع اشکال

  • Fixes to support the release of Camera-Core

Camera-View Version 1.0.0-alpha10

15 آوریل 2020

androidx.camera:camera-view:1.0.0-alpha010 is released. Version 1.0.0-alpha010 contains these commits.

رفع اشکال

  • Fixes a previous known issue where PreviewView 's surfaceView implementation wasn't working well on certain devices, and would cause the app to crash after resuming preview. ( I5ed6b )

Camera-Extensions Version 1.0.0-alpha09

1 آوریل 2020

androidx.camera:camera-extensions:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

رفع اشکال

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 , camera-core:1.0.0-beta02 , and camera-lifecycle:1.0.0-beta02 artifacts

Camera-View Version 1.0.0-alpha09

April 1, 2020 androidx.camera:camera-view:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

مسائل شناخته شده

  • Using ImplementationMode.SURFACE_VIEW with PreviewView may not work well on certain devices, this is because the SurfaceView used for preview invalidates its surface when the lifecycle of the window it's in is stopped, when it restarts, the camera is reopened and may attempt to resume preview before the SurfaceView 's surface is valid again. For now, you should use ImplementationMode.TEXTURE_VIEW .

تغییرات API

  • Renamed PreviewView.setImplementationMode() to PreviewView.setPreferredImplementationMode() .
  • Renamed PreviewView.getImplementationMode() to PreviewView.getPreferredImplementationMode() .
  • Replaced PreviewView.getSurfaceProvider() by PreviewView.createSurfaceProvider(CameraInfo) , which takes a nullable CameraInfo instance used to optimize preview by using ImplementationMode.SURFACE_VIEW whenever possible. If a null instance is passed, or if you set the preferred implementation mode to ImplementationMode.TEXTURE_VIEW , ImplementationMode.TEXTURE_VIEW is used internally.
  • The following code sample shows how a preview use case used to previously be used with PreviewView.

    preview.setSurfaceProvider(previewView.previewSurfaceProvider)
    cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    

    Right now, you can write the following:

    val camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    previewView.preferredImplementationMode = ImplementationMode.TEXTURE_VIEW
    preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.cameraInfo))
    
  • The @UiThread annotation has been added to PreviewView.getSurfaceProvider() , meaning it must be called from the main thread. ( I192f3 )

  • Added PreviewView.setScaleType() which allows to set the scale type of the preview. It accepts one of the values in PreviewView.ScaleType , and defaults to PreviewView.ScaleType.FILL_CENTER .

  • Added PreviewView.getScaleType() .

  • Removed support for setting the implementation mode for PreviewView in a XML layout using the implementationMode attribute.

  • Add createMeteringPointFactory() API to PreviewView to support converting (x, y) in PreviewView to MeteringPoint . ( Ib36d7 )

رفع اشکال

  • Fixed cases where an incorrect preview is displayed after PreviewView 's size changes. ( I71101 )

Camera-Extensions Version 1.0.0-alpha08

26 فوریه 2020

androidx.camera:camera-extensions:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Camera-View Version 1.0.0-alpha08

26 فوریه 2020

androidx.camera:camera-view:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

رفع اشکال

  • Replaced the ListenableFuture on SurfaceRequest.provideSurface() with an Executor and Callback . This simplifies the API by no longer requiring handling of exceptions on provideSurface() and enforces that the provideSurface() callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. The SurfaceRequest.Result object is now used for tracking how a SurfaceRequest uses the provided Surface . ( I7854b )
  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )

Camera-Extensions Version 1.0.0-alpha07

10 فوریه 2020

androidx.camera:camera-extensions:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .

رفع اشکال

  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )

Camera-View Version 1.0.0-alpha07

10 فوریه 2020

androidx.camera:camera-view:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .

تغییرات API

  • PreviewView 's TextureView implementation now sets the TextureView 's size to the camera sensor output size before scaling it to fill its parent PreviewView . If you want the camera preview to fill an entire part of the UI (the whole screen for instance), you should not set the PreviewView 's size to a fixed value, or have it wrap its content (by using the attribute " wrap_content " for example), this may result in the camera preview only filling part of the PreviewView (if the camera sensor output size is smaller). Instead, you should set the PreviewView as big as its parent (by using the attribute " match_parent " for example). ( 1204869 )

رفع اشکال

  • Updated ImageCapture to allow saving images to Uri and OutputStream . Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. ( Ia3bec )
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider . SurfaceProvider s no longer require developers to create their own ListenableFuture , and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView . ( I20105 )
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )
  • API updated, with getZoomRatio() , getMaxZoomRatio() , getMinZoomRatio() , and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. ( Ib19fe )

Camera-Extensions Version 1.0.0-alpha06

22 ژانویه 2020

androidx.camera:camera-extensions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-View Version 1.0.0-alpha06

22 ژانویه 2020

androidx.camera:camera-view:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Extensions Version 1.0.0-alpha05

18 دسامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

رفع اشکال

  • Updated to match the internal Camera Core APIs.

Camera-View Version 1.0.0-alpha05

18 دسامبر 2019

androidx.camera:camera-view:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

مسائل شناخته شده

  • The aspect ratio may be incorrect when using PreviewView ( b/146215202 ).

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

  • Implemented a new class called PreviewView.TextureViewImplementation that syncs the SurfaceTexture's lifecycle with the camera's usage of the TextureView's surface.

Camera-Extensions Version 1.0.0-alpha04

4 دسامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-extensions contains these commits

API changes

  • Checking for the availability and enabling of an extension now takes in a CameraSelector as an input parameter. This needs to be the same CameraSelector that is used for binding the use case.

    val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
    val builder = ImageCapture.Builder()
    val bokehImageCaptureExtender = BokehImageCaptureExtender.create(builder)
    if (bokehImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
        bokehImageCaptureExtender.enableExtension(cameraSelector)
    }
    val imageCapture = builder.build()
    mCameraProvider?.bindToLifecycle(this, cameraSelector, imageCapture)
    
  • You must initialize extensions before using the extension library.

    val availability = ExtensionsManager.init()
    Futures.addCallback<ExtensionsManager.ExtensionsAvailability>(
       availability,
       object : FutureCallback<ExtensionsManager.ExtensionsAvailability> {
           override fun onSuccess(availability: ExtensionsManager.ExtensionsAvailability?) {
               // Ready to make extensions calls
           }
           override fun onFailure(throwable: Throwable) {
               // Extensions could not be initialized
           }
       },
       Executors.newSingleThreadExecutor()
    )
    

Camera-View Version 1.0.0-alpha04

4 دسامبر 2019

androidx.camera:camera-view:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-view contains these commits

API changes

  • A PreviewView class is provided for easily displaying the output from the Preview use case in an application.
  • PreviewView can be included in the layout:

    <androidx.camera.view.PreviewView
      android:id="@+id/preview_view"
       />
    
  • PreviewView provides a PreviewSurfaceProvider to easily connect a Preview use case

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • ZoomLevel ” is now “ ZoomRatio ” in API-naming

  • Some method parameters have changed nullability

Camera-Extensions and Camera-View Version 1.0.0-alpha03

9 اکتبر 2019

androidx.camera:camera-extensions:1.0.0-alpha03 and androidx.camera:camera-view:1.0.0-alpha03 are released. These are the commits included in camera-extensions:1.0.0-alpha03 and these are the commits included in camera-view:1.0.0-alpha03 .

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

  • Added Context initializer for extensions. Extensions version incremented to 1.1.0

Camera-Extensions and Camera-View Version 1.0.0-alpha02

5 سپتامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha02 and androidx.camera:camera-view:1.0.0-alpha02 are released. These are the commits included in camera-extensions:1.0.0-alpha02 and these are the commits included camera-view:1.0.0-alpha02 .

  • Added tests to verify PreviewImageProcessorImpl has correctly implemented timestamps.
  • Fix ExtensionTest test failure on Nexus 5 (API level 21) and ensure preview is available.

Camera-Extensions and Camera-View Version 1.0.0-alpha01

7 آگوست 2019

androidx.camera:camera-extensions:1.0.0-alpha01 and androidx.camera:camera-view:1.0.0-alpha01 are released. These are the commits included in camera-extensions:1.0.0-alpha01 and these are the commits included camera-view:1.0.0-alpha01

  • New library for future Camera Extensions for accessing effects on supported devices. This library is a work in progress.
  • New Camera View class. This library is a work in progress.
،

CameraX

CameraX is an addition to Jetpack that makes it easier to add camera capabilities to your app. The library provides a number of compatibility fixes and workarounds to help make the developer experience consistent across many devices.

This table lists all the artifacts in the androidx.camera group.

مصنوع انتشار پایدار Release Candidate نسخه بتا انتشار آلفا
camera-camera2 1.4.2 - 1.5.0-beta01 -
camera-core 1.4.2 - 1.5.0-beta01 -
camera-compose - - 1.5.0-beta01 -
camera-effects 1.4.2 - 1.5.0-beta01 -
camera-extensions 1.4.2 - 1.5.0-beta01 -
camera-feature-combination-query - - - 1.5.0-alpha06
camera-feature-combination-query-play-services - - - 1.5.0-alpha06
camera-lifecycle 1.4.2 - 1.5.0-beta01 -
camera-mlkit-vision 1.4.2 - 1.5.0-beta01 -
camera-view 1.4.2 - 1.5.0-beta01 -
camera-viewfinder - - 1.3.0-beta02 1.4.0-alpha07
camera-video 1.4.2 - 1.5.0-beta01 -
This library was last updated on: May 7, 2025

تست دستگاه

CameraX is tested on many devices in our lab. To see a list of the devices currently in the lab, see CameraX lab-tested devices .

Declaring dependencies

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

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

شیار

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.5.0-beta01"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

کاتلین

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.5.0-beta01"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}
،

شیار

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.5.0-beta01"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

کاتلین

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.5.0-beta01"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}

بازخورد

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.

Camera Viewfinder Compose Version 1.0

Version 1.0.0-alpha02

12 ژوئن 2024

androidx.camera:camera-viewfinder-compose:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .

Version 1.0.0-alpha01

14 مه 2024

androidx.camera:camera-viewfinder-compose:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits .

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

  • New library. This library introduces a Compose native Viewfinder composable, that can be used with CameraX and Camera2. The composable Viewfinder supports different aspect ratios, and handling of touch events.

Camera Viewfinder Version 1.4

Version 1.4.0-alpha07

12 ژوئن 2024

androidx.camera:camera-viewfinder:1.4.0-alpha07 and androidx.camera:camera-viewfinder-core:1.4.0-alpha07 are released. Version 1.4.0-alpha07 contains these commits .

Version 1.4.0-alpha06

14 مه 2024

androidx.camera:camera-viewfinder:1.4.0-alpha06 and androidx.camera:camera-viewfinder-core:1.4.0-alpha06 are released. Version 1.4.0-alpha06 contains these commits .

تغییرات API

  • Rename Viewfinder 's ImplementationMode Enums to better reflect underlying implementations, and add fixed constants for TransformationInfo.sourceRotation . ( Ic6149 )
  • Added ZoomGestureDetector.ZoomEvent to encapsulates the states of a zoom gesture. ( I84cdf )

Camera Version 1.5

Version 1.5.0-beta01

7 مه 2025

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

تغییرات API

  • Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed ( Idb6b5 )
  • ContentScale and Alignment can now be used in the viewfinder to scale and place the displayed surface within its container, similar to how androidx.compose.foundation.Image behaves. ( Ibcea3 )
  • TransformationInfo now has default values for all args. This will allow Viewfinders to be created without any TransformationInfo , which will default to a source rotation of 0, no source mirroring, and no crop rect. ( I2b1b2 )
  • Added LifecycleCameraProvider , which is a camera provider that can be instantiated with different configurations for features such as accessing the camera of a virtual device by configuring with a customized context. ( Ia2992 )

رفع اشکال

  • Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung SM-E556B device. ( Ic0e62 , b/409478042 )
  • Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung SM-M556B device. ( Ic1a6a , b/395822788 )
  • Fixed Extensions NIGHT mode AssertError issue on Android 15 Pixel devices when doing zoom related operations. ( I27a5d , b/401460276 )
  • Fix ML Kit Analyzer incorrect bounding box coordinates issue when using CameraController . ( Iae91b , b/409808510 )

Version 1.5.0-alpha06

26 فوریه 2025

androidx.camera:camera-*:1.5.0-alpha06 is released. Version 1.5.0-alpha06 contains these commits .

تغییرات API

  • Added CameraInfo.getTorchStrengthLevel , CameraInfo.getMaxTorchStrengthLevel and CameraControl.setTorchStrengthLevel to allow customizing the torch brightness ( I00878 )
  • A new API CameraController#setTapToFocusAutoCancelDuration has been added so that users can control the auto-cancellation behavior for PreviewView tap-to-focus events. By default, CameraX cancels the focus events after 5 seconds (ie camera focus is reset) and this API allows to modify that duration or disable auto-cancellation altogether. ( Icf59a )
  • FLASH_STATE_READY has been renamed to NOT_FIRED and the other FlashState constant names are simplified for better readability. ( I8771d )
  • Exposed Low Light Boost API. Devices running Android 15 or higher can provide support for low-light boost. This feature can automatically adjust the brightness of the preview, video or image analysis streams in low-light conditions. Applications can use the new API to: 1. Use CameraInfo#isLowLightBoostSupported to check the feature availability. 2. Use CameraControl#enableLowLightBoostAsync to enable the mode when the devices can support it. 3. Use CameraInfo#getLowLightBoostState to monitor the low-light boost state. ( I937ed )
  • Add compat classes to allow faster non-camera2 querying in camera-feature-combination-query. ( Ie97ee )
  • For CameraController tap-to-focus events, a new API getTapToFocusInfoState() now exposes the corresponding tap position too by returning a LiveData of TapToFocusInfo class while the previous LiveData<Integer> returning getTapToFocusState() API is deprecated in favor of the new API. ( I238d2 )

Bug Fixes

  • Fixed the issue that preview stabilization is not applied when preview stabilization is enabled with Extensions. ( I24ad7 )
  • Fixed CameraController focus state event not resetting back to TAP_TO_FOCUS_NOT_STARTED when CameraX auto-cancels a focus event which happens after 5 seconds by default. ( I31954 )
  • Fixed preview freeze when using Zero Shutter Lag (ZSL) after multiple captures due to unreleased image resources. ( Ic3c2a )
  • Fixed issues that on some devices UHD videos are red tint when pipeline involves OpenGL . ( Idcedc )

Version 1.5.0-alpha05

15 ژانویه 2025

androidx.camera:camera-*:1.5.0-alpha05 is released. Version 1.5.0-alpha05 contains these commits .

تغییرات API

  • Add VideoCapture.getSelectedQuality() to know the selected Quality based on the QualitySelector . ( I70508 , b/204288986 )
  • When an image capture is invoked with the ImageCapture.OnImageCapturedCallback API, the ImageInfo at the returned ImageProxy can now be used to know whether flash was fired through the new ImageInfo.getFlashState() API. ( Id2c61 , b/380527406 )
  • Added OUTPUT_IMAGE_FORMAT_NV21 output format support for ImageAnalysis . ( I484ab )
  • Remove the experimental annotation of the featurecombinationquery artifact ( I4427f )
  • Adjust the zoom ratio range allowed for CameraControl by Extensions-specific characteristics when an extensions mode is enabled. ( I85af1 )

رفع اشکال

  • Upgraded compileSdk as 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade their compileSdk config setting. ( Ic80cd )
  • 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). ( Idc6c6 , b/326456246 )

Version 1.5.0-alpha04

11 دسامبر 2024

androidx.camera:camera-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits .

تغییرات API

  • Exposed ImageCapture.Builder#setOutputFormat and ImageCaptureCapabilities#getSupportedOutputFormats as stable APIs ( Ieb04a )
  • Add VideoCapture.getResolutionInfo() to get the resolution information when a VideoCapture is bound to a Lifecycle. ( Icb478 )
  • Exposed PreviewView.getScreenFlash and PreviewView.setScreenFlashOverlayColor as stable APIs. ( I74fee )

Bug Fixes

  • Fixed capture failure issue on Vivo 1610 device while taking picture with flash in the dark. ( I366f4 )
  • Fixed torch unexpectedly turning off after image capture in Redmi Note 6 Pro. ( I2e0e8 , b/377144569 )
  • Fixed an issue on Pixel Android 15 devices where NIGHT mode in Extensions failed to capture still images until the camera focused on a nearby object. ( I228d4 )
  • Fixed the still image capture malfunction issue when extensions are enabled and VideoCapture is bound together. ( I5c745 )
  • Enabled UltraHDR still image capture support for Extensions if the device can support it. ( I48300 )
  • Fixed flash timing issue for flash capture with CameraEffect targeting image captures on TCL devices. ( I7698c )

Version 1.5.0-alpha03

30 اکتبر 2024

androidx.camera:camera-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits .

تغییرات API

  • Add output format APIs for RAW and RAW + JPEG ImageCapture , the device capability check is exposed in ImageCaptureCapabilities#getSupportedOutputFormats . The OUTPUT_FORMAT_RAW is to capture RAW image, which is Adobe DNG format and OUTPUT_FORMAT_RAW_JPEG is to simultaneously capture RAW and JPEG images. The new ImageCapture#takePicture API is used for simultaneous image capture, it needs to provide two OutputFileOptions , the first one is for RAW image and the second one is for JPEG image. ( Ib0f3d )

Bug Fixes

  • Fixed preview and video under-exposure issue on TCL devices when VideoCapture is enabled. ( Id7a64 )
  • Fixed the issue where invoking startFocusMetering with PreviewView.getMeteringPointFactory doesn't get the correct sensor coordinates when an effect is enabled or when 4 use cases are bound (stream-sharing). ( I916c5 , b/345993685 )
  • Fixed the VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE event is not triggered when recording a video and there is insufficient storage space available. ( I35779 , b/356399842 )

Version 1.5.0-alpha02

2 اکتبر 2024

androidx.camera:camera-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits .

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

  • New APIs for querying camera features supported by the device. For example, checking if HDR and 60FPS can be enabled at the same time. It includes 2 artifacts: camera-feature-combination-query and camera-feature-combination-query-play-services. This is a compatible version of camera2's CameraManager#getCameraDeviceSetup#isSessionConfigurationSupported API with additional data provided by Google Play Service.

Bug Fixes

  • Fixed Preview/VideoCapture target frame rate issue on LEGACY level devices. The target frame rate set via the setTargetFrameRate or Camera2Interop API was always overwritten to the value provided by the AeFpsRangeLegacyQuirk . With this fix, CameraX library will respect the value set via the setTargetFrameRate or Camera2Interop API. ( Ie2d32 )
  • Added flash/torch/3A functionalities for image captures with CameraEffect . The image captures with CameraEffect should now have the same pre-capture and post-capture processings (eg flash trigger, 3A convergence etc. when applicable) as image capture without any CameraEffect . ( I5ff30 )
  • Excluded problematic output sizes for ImageAnalysis on Samsung SM-A057G device. When ImageAnalysis uses a resolution larger or equal to 1920x1440, it will cause black preview issue. Applied ExcludedSupportedSizesQuirk to the SM-A057G device to avoid the issue. ( I63dfe , b/365877975 )
  • Fixed Preview/VideoCapture target frame rate issue when stream sharing mechanism is enabled internally to share a stream to Preview and VideoCapture . ( I4fdac )
  • Enabled the workaround to fix the incorrect JPEG image metadata issue on Samsung S10e and S10+ devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the ImageProxy.toBitmap() function on these devices if the incorrect JPEG image metadata issue happens. ( Iae493 , b/356428987 )
  • Disabled extensions for Samsung A52s' back camera whose id is 0, because native crashes might happen when capturing HDR images and configuring capture sessions might fail for the BOKEH or FACE_RETOUCH modes. ( I03ec9 , b/364152642 )
  • Fixed the VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE event is not triggered when recording a video and there is insufficient storage space available. ( Ia5b4f , b/356399842 )
  • Fixed issue where second video recording attempt fails on Oppo A5 (CPH1931). ( I181d6 )

Version 1.5.0-alpha01

4 سپتامبر 2024

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

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

  • A new artifact, camera-compose is released for the CameraX Viewfinder Compose Adapter which displays a Preview stream from a CameraX SurfaceRequest from camera-core . ( I8666e )
  • Added a new composable, CameraXViewfinder , which acts as an idiomatic composable that adapts CameraX SurfaceRequest s for the composable Viewfinder . ( I4770f )

تغییرات API

  • Provide API to set composition settings for dual concurrent camera video capture. The settings include alpha value for blending, offset in x, y coordinates, scale of the width and height of camera frame display window. The offset, width and height are specified in normalized device coordinates. ( Ia2b8a )
  • Exposed CameraProvider.getCameraInfo to be a formal API. ( I901cd )
  • Added API PendingRecording.withAudioEnabled(boolean initialMuted) to control the initial mute state. ( I635c3 , b/354829267 )

Bug Fixes

  • Fixed the crash when bindToLifecycle is invoked with a destroyed LifecycleOwner . ( I6e6d8 )
  • Fixed Preview is black screen in front camera while binding with VideoCapture on Motorola Edge 20 Fusion. ( I1fe88 )
  • Optimized the configuration for detecting zoom gestures in PreviewView to improve smoothness. ( I04ffc )

Camera Version 1.4

نسخه 1.4.2

26 مارس 2025

androidx.camera:camera-*:1.4.2 is released. Version 1.4.2 contains these commits .

Bug Fixes

  • Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung Galaxy M55. ( Ic1a6a , b/395822788 )

نسخه 1.4.1

11 دسامبر 2024

androidx.camera:camera-*:1.4.1 is released. Version 1.4.1 contains these commits .

Bug Fixes

  • Fixed an issue on Pixel Android 15 devices where NIGHT mode in Extensions failed to capture still images until the camera focused on a nearby object. ( I228d4 )
  • Fixed the ImageCapture#takePicture malfunction issue when extensions are enabled and VideoCapture is bound together. ( I5c745 )

نسخه 1.4.0

30 اکتبر 2024

androidx.camera:camera-*:1.4.0 is released. Version 1.4.0 contains these commits .

Important changes since 1.3.0

CameraX 1.4.0 is packed with exciting updates! در اینجا خلاصه ای وجود دارد:

Headline Feature: 10-bit HDR:

  • Capture stunning HDR photos and videos with ease.
  • Supports HLG and 10-bit HEVC encoding.
  • Enjoy 10-bit HDR preview and query device capabilities.
  • Works with UltraHDR images and HDR video on a growing range of devices.

Other Cool Features:

  • Kotlin Extensions: Added takePicture and awaitInstance suspend functions.
  • Real-time Effects: Apply effects like watermarks and object highlighting.
  • CameraController API: New controls for video capture configuration.
  • Preview Stabilization: Query device capability and enable stabilization.
  • VideoCapture Enhancements: Finer control over quality and access to higher resolutions.
  • CameraX Extensions Integration: Seamless integration with VideoCapture and new ImageCapture features.
  • Shutter Sound API: Easily check regional shutter sound requirements.
  • Screen Flash: Improved low-light photos for front-facing cameras.
  • Camera Extensions Metadata APIs: Supporting APIs for adjusting extensions strength and get notification of current Extensions mode in ExtensionMode#AUTO . You can find more bug fixes in our Beta and RC announcements.

Version 1.4.0-rc04

16 اکتبر 2024

androidx.camera:camera-*:1.4.0-rc04 is released. Version 1.4.0-rc04 contains these commits .

Bug Fixes

  • Fixed the issue where invoking startFocusMetering with PreviewView.getMeteringPointFactory doesn't get the correct sensor coordinates when an effect is enabled or when 4 use cases are bound (stream-sharing). ( I916c5 , b/345993685 )

Version 1.4.0-rc03

2 اکتبر 2024

androidx.camera:camera-*:1.4.0-rc03 is released. Version 1.4.0-rc03 contains these commits .

Bug Fixes

  • Added flash/torch/3A functionalities for image captures with CameraEffect . The image captures with CameraEffect should now have the same pre-capture and post-capture processings (eg flash trigger, 3A convergence etc. when applicable) as image capture without any CameraEffect . ( I5ff30 )
  • Optimized the pinch-to-zoom smoothness in PreviewView ( I04ffc )
  • Decouple Ultra HDR from 10-bit output capability, as Ultra HDR support no longer requires devices to have 10-bit output capability. ( I96ff2 , I0c3b3 )

Version 1.4.0-rc02

18 سپتامبر 2024

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

Bug Fixes

  • Fixed the crash when bindToLifecycle is invoked with a destroyed LifecycleOwner . ( I6e6d8 )
  • Added visibility animation in ScreenFlashView for ScreenFlash#apply which also fixes bugs due to brightness change completing asynchronously after some time. ( I37cdb )
  • Improved zooming smoothness by overriding zoom settings in the framework on supported devices.

Version 1.4.0-rc01

7 آگوست 2024

androidx.camera:camera-*:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits .

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

  • Added experimental CameraInfo.getCameraInfo to provide specific camera information without the need of binding use cases to the camera. ( I550d1 )

تغییرات API

  • Added PreviewView.getScreenFlash and PreviewView.setScreenFlashOverlayColor APIs for cases where ScreenFlashView is not explicitly added. ( I43945 )

رفع اشکال

  • Fixed exposure and color tint issues when image captured with flash enabled under low light with VideoCapture use case bound. ( Ic9814 )
  • Fix the issue that interrupting a takePicture request with Extensions enabled could fail to get result and the next takePicture request might no longer work. ( Iae78f )
  • Fixed a memory leakage issue that happens when Extensions are enabled. ( Iab276 )
  • Resolved a CameraX extensions malfunction on devices like Pixel 7/8 and Samsung Galaxy S24 series. The issue, stemming from a Camera2OutputConfigImpl conversion problem in release mode, surfaced after upgrading AGP to 8.5.1 and enabling minification. ( I99598 , b/354824993 )

Version 1.4.0-beta02

12 ژوئن 2024

androidx.camera:camera-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits .

تغییرات API

  • Similar to VideoCapture , add setMirrorMode for Preview use case. It will support mirror mode ON and OFF for Preview stream via OutputConfiguration.setMirrorMode from API 33 and above, for older APIs, it will be no-op. ( I821f4 )

Bug Fixes

  • Fixed the issue that apps can't take pictures successfully on Samsung Tab A8 when ImageCapture selects 1920x1080 under Preview + VideoCapture + ImageCapture UseCase combination. ( I5a463 , b/336925549 )
  • Fixed persistent recording may fail to continue recording after switching camera. ( Icb0a1 )

Version 1.4.0-beta01

14 مه 2024

androidx.camera:camera-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits .

تغییرات API

  • Added ZoomGestureDetector.ZoomEvent to encapsulates the states of a zoom gesture. ( I84cdf )

Bug Fixes

  • Fixed a bug that still capture and tap-to-focus do not use the repeating request FPS/stabilization mode values which may recreate capture session and cause latency issues or Preview freeze in some devices. ( I7dc0b )
  • Fixed a bug where High Resolutions can not be selected when CameraEffect is enabled on some devices. (eg 4000x3000 on Samsung A32 5G). ( Ie3ed3 , b/337336152 )
  • Fixed a crash when taking picture with Preview, ImageCapture and VideoCapture(UHD) are bound on Pixel 4XL API29. ( I5b288 )
  • Support virtual devices: Context passed into ProcessCameraProvider will preserve the device ID to ensure the functionality in a virtual device environment. ( I5ba48 )

Version 1.4.0-alpha05

17 آوریل 2024

androidx.camera:camera-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits .

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

  • Converted ProcessCameraProvider into Kotlin implementation. ( I46d4f )
  • Added ImageCapture.takePicture suspend functions to allow it to be called in a Kotlin-idiomatic way. ( I920be )

تغییرات API

  • Add output format APIs to ImageCapture , and add getSupportedOutputFormats method to ImageCaptureCapabilities for querying device capability. The default output format value is OUTPUT_FORMAT_JPEG , which captures SDR images in JPEG format. When the device supports Ultra HDR and the output format is set to OUTPUT_FORMAT_JPEG_ULTRA_HDR , CameraX will capture Ultra HDR compressed images using the JPEG/R image format. The format is backwards compatible with SDR JPEG format and supports HDR rendering of content. This means that on older apps or devices, images appear seamlessly as regular JPEG; on apps and devices that have been updated to fully support the format, images appear as HDR. ( I5de50 )
  • Add PhysicalCameraInfo in CameraInfo to query physical camera information and add physical camera id setter/getter in CameraSelector ( Ic5b90 )
  • Replace CameraController#COORDINATE_SYSTEM_VIEW_REFERENCED with ImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCED . The value of the constant remains the same. This is for consolidating all the constants into one place. ( I890bb )
  • New RetryPolicy API empowers developers to customize retry behavior for CameraX initialization. ( I36dd2 )
  • Enable creation of ImageCaptureLatencyEstimate object to assist with testability ( Iaba99 )
  • Add a ImageAnalysis#COORDINATE_SYSTEM_SENSOR . When this is used, the MlKitAnalyzer returns coordinates in the camera sensor coordinate system. ( I3ec61 )
  • Exposed extensions metadata API. New CameraExtensionsInfo and CameraExtensionsControl interfaces allow applications to monitor and adjust extension strength settings. Applications can obtain the CameraExtensionsInfo or CameraExtensionsControl instance via the newly added ExtensionsManager#getCameraExtensionsInfo() or ExtensionsManager#getCameraExtensionsControl() methods. ( I28e1a )
  • Added ProcessCameraProvider.awaitInstance which is a suspending version of ProcessCameraProvider.getInstance ( Ib22b9 )
  • Add a PreviewView#getSensorToViewTransform() API. The Matrix represents the transformation from camera sensor coordinates to the PreviewView 's coordinates. This can be used to transform coordinates from one UseCase to another. For example, transforming the coordinates of detected objects in ImageAnalysis to PreviewView overlay. ( I947ab )
  • Make camera-viewfinder-core API more generic so it can be used by camera-viewfinder and camera-viewfinder-compose . ( I1e295 )
  • Add getSurface function to ViewfinderSurfaceRequest . ( I781a0 )
  • Use camera-viewfinder-core in camera-viewfinder and deprecate ViewfinderSurfaceRequest and CameraViewfinder . ( I6198c )
  • Added ZoomGestureDetector that interprets scaling gestures specifically configured for pinch-to-zoom activity. ( Ifafbf )

Bug Fixes

  • Fixed ImageAnalysis ' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting a ResolutionSelector with the preferred resolution and a matching AspectRatioStrategy to the ImageAnalysis UseCase can workaround this issue. ( I81f72 , b/330091012 )
  • Fixed an issue that queued takePicture request might fail to run if the current request is failed. ( Ie0801 )
  • Make the invalid JPEG data check applied to Vivo X60 and X60 Pro devices. This can fix abnormally large image issue on these devices. ( I82247 , b/288828159 )
  • Fixed the incorrect JPEG image metadata issue on Samsung A24 devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the ImageProxy.toBitmap() function on Samsung A24 devices. ( I8d6eb , b/309005680 )
  • Make the invalid JPEG data check applied to all Samsung devices if the captured image is larger than 10 MB. This can fix abnormally large iamge issue on Samsung devices. ( Ic2a65 , b/288828159 )
  • Removed ImageAnalysis support on CameraX Extensions as many OEMs' Extensions implementations don't work with ImageAnalysis well and might cause inconsistent issues. ( I2d926 )

Version 1.4.0-alpha04

24 ژانویه 2024

androidx.camera:camera-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits.

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

  • New artifact: camera-effects: A library for applying real time effects to CameraX output, including Preview , VideoCapture and/or ImageCapture . This artifact contains OpenGL implementations of the CameraEffect API that manipulates the camera output efficiently.
  • OverlayEffect : for drawing overlays with Android's Canvas API. This allows the app to apply a watermark or highlight detected objects on camera outputs.
  • DynamicRange APIs for the Preview Use Case: The dynamic range can now be set on the Preview Use Case, independently of the Video Use Case. This allows HDR dynamic ranges such as HLG10 for Preview alone. New APIs are also available in CameraInfo to query which dynamic ranges each camera supports.

تغییرات API

  • Renamed ScreenFlashUiCompleter to ScreenFlashListener and moved ScreenFlashUiCompleter#getExpirationTimeMillis to expirationTimeMillis parameter of ScreenFlash#apply . ( I13944 )
  • New APIs added to allow dynamic range to be set on Preview use case, and to query dynamic ranges supported by each camera. This allows HDR dynamic ranges, such as HLG10, to be used with the Preview use case alone, no longer requiring a VideoCapture to be bound at the same time. ( If25e3 )
  • Renamed getMirroring() to isMirroring() ( I47063 )
  • Added Realtime still capture latency estimate support in CameraX. Camera extensions enable applications to use an API that provides an estimate of how long a capture will take. The estimate takes into account the current environment conditions, the camera state and includes the time spent processing multi-frame capture requests along with any additional time for encoding processed buffers if necessary. ( I05c3a )
  • Renamed ScreenFlashUiControl to ScreenFlash , ScreenFlashUiControl#applyScreenFlashUi to ScreenFlash#apply , ScreenFlashUiControl#clearScreenFlashUi to ScreenFlash#clear , and added getScreenFlashUiApplyTimeoutSeconds method instead of exposing SCREEN_FLASH_UI_APPLY_TIMEOUT_SECONDS directly. ( Iccdd0 )

Bug Fixes

  • Fixed a memory leakage that results in activities or fragments not being released when Extensions are enabled ( I14215 )
  • Fixed the issue where getZoomRatio incorrectly returned a decreased value when applying an increasing zoom ratio. ( I4aa0d , b/317543616 )
  • ImageCapture#ScreenFlash#clear event is invoked immediately when ImageCapture is unbound or camera is closed, also fixes some bugs where it is never invoked due to captures in these scenarios not completing properly. ( If99f9 )
  • Fixed the crash that happens when lifecycle is stopped before takePicture request is completed ( Idf017 , b/306202751 )
  • Fixed the issue where camera preview becomes black when Extensions are enabled on some devices ( I1ffd0 )
  • Fixed incorrect duration of video recording on devices using the Snapdragon 778G SoC. ( If6aa7 , b/316057919 )

Version 1.4.0-alpha03

13 دسامبر 2023

androidx.camera:camera-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.

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

  • Added CameraInfo.mustPlayShutterSound to provide the information of whether a shutter sound must be played in accordance to regional restrictions. ( Ifda84 )
  • Added OnImageCapturedCallback.onCaptureStarted and OnImageSavedCallback.onCaptureStarted for notifying when the camera has started exposing a frame. It's recommended to play the shutter sound or the shutter animation at this point. ( Ic49b3 )
  • Added Screen Flash feature support in CameraX for front camera image capture. CameraX will take care of the framework-side API handling and sync the timing with application's UI changes as required (eg AE precapture trigger after app screen color/brightness change). Apps will only need to add their UI side implementations in the ScreenFlashUiControl interface provided to CameraX. ( I8ae84 )
  • Added Screen Flash feature UI-side implementation support in CameraX. Apps will be able to get a basic ImageCapture.ScreenFlashUiControl implementation from PreviewView or the newly added ScreenFlashView which will add a mono-color overlay view and maximize screen brightness during screen flash photo capture. ( I1810e )

تغییرات API

  • Supports new Extensions features(postview and capture process progress): Added ImageCapture#getImageCaptureCapabilities() APIs for apps to query the capabilities of the postview and capture process progress callback. Apps can enable the postview using the ImageCapture.Builder#setPostviewEnabled() . The postview size can be selected using ImageCapture.Builder#setPostviewResolutionSelector() . When invoking takePicture() , onPostviewBitmapAvailable and onCaptureProcessProgressed can be implemented in OnImageSavedCallback or OnImageCapturedCallback to get the postview and process progress notification if supported. ( I5cd88 )
  • APIs for calculate coordinates transformation from sensor to the current buffer, with a flag indicating whether the Surface contains the camera orientation info. ( I59096 )
  • Expose the API to query PreviewCapabitlity in Preview UseCase . ( Ie5b6c )
  • Added APIs to support more qualities for VideoCapture . Recorder.Builder#setVideoCapabilitiesSource(int) can be used with VIDEO_CAPABILITIES_SOURCE_CODEC_CAPABILITIES to create a Recorder instance which supports more qualities than VIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILE . A common use case is when the application strives to record UHD video whenever feasible, but the device's CamcorderProfile does not include a UHD settings, even though the codec is capable of recording UHD video. ( Iedbe2 , b/263961771 )
  • Add ImageAnalysis output format getter/setter to CameraController . ( I9a96c , b/308240643 )

Bug Fixes

  • From Camera 1.3.1 : Improved the ProcessCameraProvider#bindToLifecycle() performance. The major change is to optimize the process of identifying the most suitable size combinations for UseCases . The optimal results vary based on the specific UseCase combinations and the number of supported output sizes for the target devices. ( I454f2 )
  • Allow the use of VideoCapture when Extensions are enabled. ( I91f32 )
  • Fixed large captured JPEG image issue on Samsung A71 and M51 series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have extreme file size. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I01afc , b/288828159 )
  • Disable ImageAnalysis support on Pixels to avoid the bug on Pixel that returns the non-empty ImageAnalysis supported sizes accidentally. ( I7ec31 )
  • Fixed performance issue where CPU loading and power consumption increased when Extensions are enabled. ( Ibdccb )
  • Added Snapdragon 480 to the CameraUseInconsistentTimebaseQuirk . This fixes an issue on Android 12 for devices using this chipset where the audio in recordings is offset by the amount of time the device is in a suspended state. ( I58010 )

Version 1.4.0-alpha02

18 اکتبر 2023

androidx.camera:camera-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.

تغییرات API

  • Rename the API to setCameraOpenRetryMaxTimeoutInMillisWhileResuming and rename the argument. ( I72370 )
  • Adding APIs to query the device capability and enable video/preview stabilization. ( I87544 )
  • Provide API to customize the camera open retrying max timeout time. ( I0c642 )
  • Released ProcessCameraProvider.shutdownAsync as a public testing API to allow process camera provider to be used in test suites which may need to initialize CameraX in different ways in between tests. ( I9eca7 )
  • Add APIs for configuring video capture dynamic range, frame rate and mirror mode. ( Ifb8f7 )
  • Deprecate OutputSize and replace it with ResolutionSelector . ResolutionSelector is a more comprehensive way to select resolutions, and it's consistent with the camera-core API. ( I93abd , b/286801438 )

Bug Fixes

  • Fixed the black preview issue on Samsung Galaxy S23 Ultra 5G when Extensions Bokeh or Face-Retouch is enabled with ImageAnalysis on the rear camera. ( I2e8b1 )
  • Fixed Preview and VideoCapture stretched issues on Moto E5 Play. ( 73dce2 )

Version 1.4.0-alpha01

20 سپتامبر 2023

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

تغییرات API

  • Add new API to access audio amplitude information while recording. ( Id4925 )

Bug Fixes

  • Improve Extensions stability by ensuring that the initialization and deinitialization events are triggered in correct order. ( Ib3b8e )
  • Fixed capture session configuration failure for exceeding supported surface combination due to adding extra repeating surface internally. ( Id718c )
  • Fixed large captured JPEG image issue on Vivo S16 device. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have large file size. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I79505 , b/299069235 )
  • Fixed the issue that ImageAnalysis can't be bound together with ImageCapture and Preview when some extension modes are enabled on some devices. The fix will return correct value when apps query the ImageAnalysis availability via ExtensionsManager#isImageAnalysisSupported() . ( I7d538 )
  • Update JavaDoc to match behavior. Instead of completes immediately, the #setZoomRatio , #setLinearZoom and #enableTorch wait until camera is ready. Also added information about how to get the maximum FOV with the #takePicture API. ( I23588 )

نسخه 1.3

نسخه 1.3.4

12 ژوئن 2024

androidx.camera:camera-*:1.3.4 is released. Version 1.3.4 contains these commits .

Bug Fixes

  • Fixed the issue where getZoomRatio incorrectly returned a decreased value when applying an increasing zoom ratio. ( I4aa0d , b/317543616 )
  • Fixed still capture/tap-to-focus not using the repeating request FPS/stabilization mode values which may re-create capture session and cause latency issues or Preview freeze in some devices. ( I7dc0b )
  • Fixed the issue that the frame rate is set to a lower value when calling setTargetFrameRate with FRAME_RATE_RANGE_UNSPECIFIED . ( I78c61 )

نسخه 1.3.3

17 آوریل 2024

androidx.camera:camera-*:1.3.3 is released. Version 1.3.3 contains these commits .

Bug Fixes

  • Fixed ImageAnalysis ' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting a ResolutionSelector with the preferred resolution and a matching AspectRatioStrategy to the ImageAnalysis UseCase can workaround this issue. ( I81f72 , b/330091012 )

نسخه 1.3.2

6 مارس 2024

androidx.camera:camera-*:1.3.2 is released. Version 1.3.2 contains these commits .

Bug Fixes

  • Fixed a JPEG metadata issue on Samsung A24 devices. CameraX now saves images accurately, and the ImageProxy.toBitmap() function returns correct Bitmap objects. ( I8d6eb , b/309005680 )
  • Removed the 9280x6944 resolution option on Redmi Note 9 Pro devices due to issues. ( Ia23da )

نسخه 1.3.1

13 دسامبر 2023

androidx.camera:camera-*:1.3.1 is released. Version 1.3.1 contains these commits.

رفع اشکال

Improved the ProcessCameraProvider#bindToLifecycle() performance. The major change is to optimize the process of identifying the most suitable size combinations for UseCases . The optimal results vary based on the specific UseCase combinations and the number of supported output sizes for the target devices. ( I454f2 )

Here are some reference results for various scenarios:

  • Four UseCases : Preview + ImageCapture + ImageAnalysis + VideoCapture

    • Google Pixel 7: Approximately 430 ms to 60 ms
    • Samsung Galaxy S23 Ultra: Approximately 540 ms to 45 ms
    • Samsung A53 5G: Approximately 115 ms to 70 ms
  • Three UseCases : Preview + ImageCapture + ImageAnalysis

    • Google Pixel 7: Approximately 9 ms to 7 ms
    • Samsung Galaxy S23 Ultra: Approximately 6 ms to 5 ms
    • Samsung A53 5G: Approximately 32 ms to 12 ms
  • Added Snapdragon 480 to the CameraUseInconsistentTimebaseQuirk . This fixes an issue on Android 12 for devices using this chipset where the audio in recordings is offset by the amount of time the device is in a suspended state. ( I58010 )

نسخه 1.3.0

18 اکتبر 2023

androidx.camera:camera-*:1.3.0 is released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

Version 1.3.0-rc02

20 سپتامبر 2023

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

Bug Fixes

  • Improve Extensions stability by ensuring that the initialization and deinitialization events are triggered in correct order. This fixed some black preview issues when switching Extensions modes or switching cameras. ( Iddaac )
  • Fixed the issue that ImageAnalysis can't be bound together with ImageCapture and Preview when some extension modes are enabled on some devices. The fix will return correct value when apps query the ImageAnalysis availability via ExtensionsManager#isImageAnalysisSupported() . ( I7d538 )
  • Fixed the issue where the recorded video audio and video were out of sync when mirroring mode was enabled on Xiaomi Poco X3 NFC. ( I20b4c )

Version 1.3.0-rc01

23 آگوست 2023

androidx.camera:camera-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.

تغییرات API

  • Added PendingRecording.asPersistentRecording to allow a recording to continuously record while the VideoCapture it's Recorder is attached to is rebound. ( I517c6 )

Bug Fixes

  • Fixed a crash when a stream is shared with both VideoCapture and Preview. Also fixed a black screen on LEGACY devices when stream sharing is enabled.
  • Fixed large captured JPEG image issue on Samsung S7 (SM-G930T, SM-G930V) series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have large file size. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I407b0 , b/288828159 )
  • Fixed large captured JPEG image issue on Samsung S22 (SM-S901B, SM-S901B/DS) and S22+ (SM-S906B) series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have large file size about 13MB on S22 SM-S901B/DS device. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I73be9 , b/288828159 )
  • Fixed large captured JPEG image issue on Samsung A5, A52, A70 and A72 series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have extreme file size (ex about 32MB or even 96 MB). Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I97c4d , b/288828159 )
  • Fixed the native crash when taking pictures with Extensions enabled ( I698f5 )

Version 1.3.0-beta02

26 جولای 2023

androidx.camera:camera-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.

Bug Fixes

  • Use torch as flash for Pixel 4 and 5 variants to improve capture quality in low light ( I56ff5 , b/280221967 )
  • Fixed large captured JPEG image issue on Samsung A5 (2017) series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have about 32 MB file size. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. ( I29837 , b/288828159 )
  • Fixed retry not triggering properly in case of capture failure in problematic devices mentioned in CaptureFailedRetryQuirk . ( I7b589 )

Version 1.3.0-beta01

21 ژوئن 2023

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

تغییرات API

  • Renamed the ResolutionSelector.Builder#setHighResolutionEnabledFlag(int) function name to setAllowedResolutionMode and renamed the ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF / ON constants to PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION / PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE . ( If84e8 )
  • Removed deprecated API ImageAnalysis.setTargetRotationDegrees(int) , ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int) . ( Id8e77 )
  • The DynamicRange class respresent the dynamic range of images. This can be used to select High Dynamic Range formats as the output of VideoCapture through VideoCapture.Builder#setDynamicRange() . ( Ib0377 )
  • Added an isImageAnalysisSupported API to the ExtensionsManager which apps can determine if an ImageAnalysis use case can be bound along with Preview and ImageCapture when Extensions are enabled. ( I1bc63 )
  • The new VideoCapabilities class obtained from the Recorder can be used to query supported dynamic ranges and qualities for video recording on the device. QualitySelector 's getSupportedQualities() and isQualitySupported() methods are being deprecated. Please use VideoCapabilities 's getSupportedQualities() and isQualitySupported() methods instead. ( I04014 )
  • CameraController#setVideoCaptureTargetQuality() is renamed to setVideoCaptureQualitySelector and takes argument QualitySelector , which provides more flexibility for video quality setup. CameraController#getVideoCaptureTargetQuality() is changed to getVideoCaptureQualitySelector accordingly. ( I520ed )
  • Removed the experimental annotation for video features. The video features are now stable. ( I1a113 )

Bug Fixes

  • Use torch as flash on Samsung SM-A320 models to improve the speed and the captured image quality in low light. ( I6a022 , b/286190938 )
  • Add ImageFormat.JPEG format support for ImageProxy.toBitmap() . If the JPEG byte array cannot be decoded, an UnsupportedOperationException will be thrown. ( I81958 , b/282057603 )

Version 1.3.0-alpha07

24 مه 2023

androidx.camera:camera-*:1.3.0-alpha07 is released. Version 1.3.0-alpha07 contains these commits.

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

  • The new VideoCapture.Builder# setTargetFrameRate(Range) API allows video recordings to be captured at other frame rates besides the device default. The available frame rates for recordings can be queried through the new CameraInfo#getSupportedFrameRates() API.

تغییرات API

  • Renamed ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF / ON constants to ALLOWED_RESOLUTIONS_NORMAL / SLOW and renamed the builder setHighResolutionEnabledFlag function name to setAllowedResolutionMode . ( Iae817 )
  • CameraInfo#getSupportedFrameRateRanges() now returns a Set rather than a List to better represent that the ranges are unordered. ( I02f43 )
  • Add an error listener to CameraEffect to handle unrecoverable errors ( Ice471 )
  • Add public constructor in ResolutionInfo for better testability ( If6d1c )
  • Provided an API UseCase.snapToSurfaceRotation(int) to replace usage of setTargetRotationDegrees and deprecate API ImageAnalysis.setTargetRotationDegrees(int) , ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int) . ( Ia9010 )
  • Added new API Preview#getTargetFrameRate and Preview.Builder#setTargetFrameRate to be able to set and retrieve target frame rate for Preview use case ( If4f22 )
  • VideoRecordEvent.Finalize will now complete with error code ERROR_RECORDING_GARBAGE_COLLECTED when the Recording object is stopped due to garbage collection. ( Iba974 )

Bug Fixes

  • Fixed NullPointerException when the cached output sizes in StreamConfigurationMapCompat are null. ( Idf124 , b/282025204 )
  • Fixed the issue that Preview.setSurfaceProvider(null) doesn't pause the preview in Extensions ( Ia903e )
  • Fixed an issue where ConcurrentModificationException is thrown during camera opening when VideoCapture is bound. ( Ic8ac4 )

Version 1.3.0-alpha06

19 آوریل 2023

androidx.camera:camera-*:1.3.0-alpha06 is released. Version 1.3.0-alpha06 contains these commits.

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

  • Concurrent camera is a new feature introduced from Android 11, which supports simultaneous streaming of camera devices, for example, it allows a device to have both the front and back cameras operating at the same time. CameraX currently only supports dual concurrent cameras, which allows two cameras operating at the same time, with at most two {@link UseCase}s bound for each. The max resolution is 720p or 1440p, more details in the following link, see CameraManager#getConcurrentCameraIds()
  • Introducing the new ResolutionSelector API which covers the following features:
    • Applications can specify aspect ratio and resolution strategies to select the best resolution for their needs.
    • All sizes and aspect ratio parameters are expressed in the coordinates of the camera device sensor.
    • Applications can implement a custom resolution filter to arrange the supported sizes in the desired order.
    • Applications can also enable high resolution capture to obtain higher resolution images. However, please note that using a high resolution may result in slower capture times.
    • Added VideoCapture mirroring APIs. Videos recorded by VideoCapture are not mirrored by default. However, the camera preview is mirrored on the front camera by default. VideoCapture mirroring APIs make it possible to align to the camera preview when using the front camera. There are three MirrorMode , OFF , ON and ON_FRONT_ONLY . To align to the camera preview, it is recommended to use ON_FRONT_ONLY which means that mirroring is not enabled for the rear camera but is enabled for the front camera.

تغییرات API

  • Exposed new ResolutionSelector API. Applications can specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results. Applications can specify a flag to enable high resolution capture. This will allow CameraX to select higher resolutions when taking photos or videos. However, please note that using a high resolution may result in slower capture times. ( Ibed95 )
  • The FPS ranges supported by the AE algorithm can now be queried via CameraInfo#getSupportedFrameRateRanges() . ( Iaa67f )
  • Consolidate the names of all frame rate methods into using 'FrameRate'. Correct the javadoc mistake in VideoCapture#getTargetFrameRate() ( I83304 )
  • Deprecated the legacy setTargetAspectRatio and setTargetResolution API. Please use the new ResolutionSelector API instead. ( I542c3 )
  • Added public APIs for concurrent dual camera, including
    1. List<List<CameraInfo>> getAvailableConcurrentCameraInfos()
    2. ConcurrentCamera bindToLifecycle(@NonNull ConcurrentCameraConfig concurrentCameraConfig)
    3. boolean isConcurrentCameraModeOn() and ConcurrentCameraConfig , SingleCameraConfig and ConcurrentCamera ( Iab1c1 )
  • Make ImageProcessor.Response#getOutputImage NonNull ( Ib9c60 )
  • Added VideoCapture mirroring APIs, including VideoCapture.Builder.setMirrorMode(int) and VideoCapture.getMirrorMode() . The APIs are useful for applications require the video recording to be consistent with common camera preview behavior, ie the rear camera preview is not mirrored but the front camera preview is mirrored. ( I713b6 , b/194634656 )
  • Add setTargetFrameRate() API in the VideoCapture.Builder and getTargetFramerate() API in VideoCapture ( I109d4 )
  • Make SurfaceOutput extending Closable and hide S urfaceOutput.Event 's public constructor. ( I60ea8 )
  • Added Recording.mute to dynamically mute or unmute an in-processing recording. RecordingStats will contain AudioStats.AUDIO_STATE_MUTED when the in-processing recording is muted explicitly. ( Ie17fc )
  • Made #setEffects() parameter non-null. Add a #clearEffects() API for clearing effects. The app should call #clearEffects() to remove effects. ( I4b4d9 )
  • Add a second constructor for ViewfinderSurfaceRequest.Builder to take a builder for copy constructor ( I621a7 )

Bug Fixes

  • Fixed the issue where apps invoking Extensions API could crash when closing the camera ( Ib27e5 )
  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. ( Ibec7e , b/270656244 )
  • Fixed the issue where taking pictures using File in the external storage public folder will always fail in Android 10 or above. Please note that in Android 10, taking pictures using File in the external storage public folder also requires setting requestLegacyExternalStorage to true in application tag. ( I11b2c )
  • Fixed a RejectedExecutionException crash in DefaultSurfaceProcessor . The crash could happen when VideoCapture is bound and the activity is paused. ( Idb46a , b/273713906 )

Version 1.3.0-alpha05

22 مارس 2023

androidx.camera:camera-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits.

تغییرات API

  • Added VideoCapture rotation APIs, including VideoCapture.Builder.setTargetRotation(int) , VideoCapture.setTargetRotation(int) , VideoCapture.setTargetRotationDegrees(int) and VideoCapture.getTargetRotation() . The APIs are useful for applications that lock the device orientation. ImageCapture.setTargetRotationDegrees(int) and ImageAnalysis.setTargetRotationDegrees(int) are also added. ( Id3ffe , b/205242781 )
  • Allow VIDEO_CAPTURE and PREVIEW|VIDEO_CAPTURE as effects target. Effects that targets VIDEO_CAPTURE will be applied to the VideoCapture UseCase; Effects that targets PREVIEW|VIDEO_CAPTURE will be applied to a shared stream before copying to Preview and VideoCapture stream. ( Iee6f3 )

Bug Fixes

  • From Camera 1.2.2 : Fixed the issue where CameraX Extensions don't work properly when proguard is enabled on some devices such as Pixel ( I90aa2 )
  • Fixed a PreviewView bug that if the app handles screen orientation itself. the preview might become distorted upon rotation. This only happens on certain devices. It can be reproduced on Pixel a4, Pixel 5, and Pixel 6a. ( I14340 , b/223488673 )

Version 1.3.0-alpha04

22 فوریه 2023

androidx.camera:camera-*:1.3.0-alpha04 is released. Version 1.3.0-alpha04 contains these commits.

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

A new feature to support previously unsupported Surface combinations by sharing one stream to multiple UseCases.

  • Previously, when binding “Preview, VideoCapture, ImageAnalysis” on camera hardware level FULL and below, or binding “Preview, VideoCapture, ImageCapture” on hardware level LEGACY, CameraX throws IllegalArgumentException .
  • The new behavior is that the bindings will work without throwing exceptions. Instead, CameraX uses OpenGL to copy a shared stream to both Preview and VideoCapture.
  • As the cost of the buffer copy, the app may see an increase in latency and power consumption.

تغییرات API

  • Add API to convert ImageProxy to Bitmap . The supported ImageProxy format is ImageFormat.YUV_420_888 and PixelFormat.RGBA_8888 . If the format is invalid, IllegalArgumentException will be thrown. ( Ic7110 )
  • Add CoroutineCameraViewfinder to support configuring viewfinder using suspending functions in Kotlin. ( I657bc )
  • Add new public constructor for ViewfinderSurfaceRequest . It provides the flexibility when user cannot provide CameraCharacteristics . ( Ie6549 )

Bug Fixes

  • Fixed the Extensions crash that happens on some Samsung devices when pausing/resuming the app too quickly ( Iaca26 )

Version 1.3.0-alpha03

January 25, 2023

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

تغییرات API

  • Added CameraInfo.getIntrinsicZoomRatio to provide angle of view information relative to the default camera. ( Ib300c )
  • Added CameraInfo.getLensFacing to provide lens facing information. Added CameraSelector#LENS_FACING_EXTERNAL as an experimental feature for selecting external cameras. ( Icaf3e )
  • Add #setEffect() to CameraController that allows adding effects to camera output. ( I1d21f )
  • Add invalidate() method to SurfaceRequest . The Surface provider can notify that the previously provided surface is no longer valid. ( Idc649 )
  • Add a ImageProcessor API. This interface is for inject post-processing effects into the ImageCapture pipeline. ( I575c6 )
  • Added API Recorder.Builder.setAspectRatio() which can be combined with QualitySelector to support more video resolutions. ( I8a082 )
  • Added Recorder.Builder#setTargetVideoEncodingBitRate to set Target Video Encoding BitRate and Recorder#getTargetVideoEncodingBitRate to get Target Video Encoding BitRate. ( I5984d )

Bug Fixes

  • Fixed ImageCapture failed when there is no flash unit and flash mode is on. ( I9e8b4 , b/263391112 )
  • Fixed JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. ( Ib7086 , b/263747161 , b/263289024 )
  • when setting torch/zoom prior before camera initialization compelets, eg calling CameraController#enableTorch , the pending action is cached and submitted once the initialization compeltes. ( I11e92 , b/264157663 )

Version 1.3.0-alpha02

7 دسامبر 2022

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

تغییرات API

  • add a new API for applying post-processing effect to Preview output. ( Ic17d5 )
  • Renamed OutputOptions.getDurationLimit to OutputOptions.getDurationLimitMillis and OutputOptions.setDurationLimit to OutputOptions.setDurationLimitMillis . ( I91f0c )
  • Add AudioConfig class to handle the audio related setting while recording video. The @RequiresPermission annotation is moved from startRecording functions to AudioConfig to avoid unnecessary permission requests for the cases that audio is not needed. ( I28755 )
  • Remove Metadata, OnVideoSavedCallback , OutputFileOptions and OutputFileResults classes that are no longer used after applying the new video capture API. ( I38cd8 )
  • Apply the new video capture API. The getVideoCaptureTargetSize and setVideoCaptureTargetSize methods are replaced with the getVideoCaptureTargetQuality and the setVideoCaptureTargetQuality methods accordingly, as setTargetResolution is no longer supported. ( I2a1d5 )

Bug Fixes

  • Remove deprecated core.VideoCapture API. ( I531e0 )
  • Fixed the issue that the onError callback is not called when taking pictures without the storage permission.( I936db , b/244807669 )
  • Improve camera extensions quality and reliability. Camera extensions are disabled on Motorola devices using Camera Extensions v1.1.0 and older due to issues with Bokeh support, image capture, and preview not resuming. ( Id3ce3 )
  • Fixed native crash when video cropping via ViewPort is enabled on legacy devices. ( I16b8a , b/251357665 )

Version 1.3.0-alpha01

9 نوامبر 2022

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

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

  • Camera-viewfinder has been published officially. Camera-viewfinder provides a base viewfinder widget that can display the camera feed for Camera2. Please check the sample code for an example.

تغییرات API

  • Added OutputOptions.setDurationLimit to allow setting of video duration limit. The recording will be automatically finalized when exceeding the specified duration limit. ( I902a0 )
  • Add video recording audio error state AudioStats.AUDIO_STATE_SOURCE_ERROR . Sent when audio source setup fails or some error occurs. ( I37410 )

Bug Fixes

  • Add quirk to allow some problematic devices to retry capture once when encountering capture failures. ( Id4795 )
  • Fix PreviewView SurfaceView implementation black screen issue on ViewPager2 . As part of the fix, PreviewView will reuse its SurfaceView if the requested resolution is not changed. ( Ib3f27 )
  • Support video cropping (WYSIWYG feature) when ViewPort or CameraController API is used. ( Ifbba8 , b/201085351 )
  • Fixed video captured with front camera fails to record on Huawei P40 lite. ( I87c57 , b/250807400 )

نسخه 1.2

Version 1.2.3

24 مه 2023

androidx.camera:camera-*:1.2.3 is released. Version 1.2.3 contains these commits.

Bug Fixes

  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. ( Ibec7e , b/270656244 )

Version 1.2.2

22 مارس 2023

androidx.camera:camera-*:1.2.2 is released. Version 1.2.2 contains these commits.

Bug Fixes

  • Fixed the issue where CameraX Extensions don't work properly when proguard is enabled on some devices such as Pixel ( I90aa2 )

نسخه 1.2.1

25 ژانویه 2023

androidx.camera:camera-*:1.2.1 is released. Version 1.2.1 contains these commits.

Bug Fixes

  • Fix JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. ( b/263289024 )

نسخه 1.2.0

7 دسامبر 2022

androidx.camera:camera-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Added MLKitAnalyzer as new APIs.
  • New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG , the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don't support ZERO_SHUTTER_LAG , it'll fallback to CAPTURE_MODE_MINIMIZE_LATENCY .
  • Deprecate android.camera.core.VideoCapture .
  • Added setStreamUseCase() as a public Camera2Interop API.
  • Added API level requirement for setOutputImageRotationEnabled .
  • Renamed ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution() .
  • Added API for setting location metadata to the saved video.
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and the user switches the cameras.
  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices.
  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed

Version 1.2.0-rc01

24 اکتبر 2022

androidx.camera:camera-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.

تغییرات API

  • Add setStreamUseCase API for OutputConfiguration . User can specify the Stream Use Case for the stream session, overrding CameraX's internal logics to choose Stream Use Case in order to optimize according to their need. ( Ib1a95 )

Bug Fixes

  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices. Resolution 1920x1080 causes the Preview/VideoCapture images to be stretched. Added workaround to not select the 1920x1080 resolution for Preview or VideoCapture to avoid the image stretched problem. ( I0e04e )
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio on some Huawei devices. ( If8c88 , b/223643510 )
  • Fixed camera open failure when Preview's SurfaceProvider is not set. As part of the fix, Preview with no SurfaceProvider set will now not be configured into the camera capture session. ( I99681 )

Version 1.2.0-beta02

21 سپتامبر 2022

androidx.camera:camera-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

تغییرات API

  • Add API level requirement for setOutputImageRotationEnabled ( I26e3e , b/240993561 )

Bug Fixes

  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed. ( I05f69 )
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and user switches the cameras. ( If6168 )

Version 1.2.0-beta01

24 آگوست 2022

androidx.camera:camera-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

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

  • New library camera-mlkit-vision . Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Please find the sample code here .
  • New experimental Zero-Shutter Lag API . Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don't support ZERO_SHUTTER_LAG, it'll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
  • Made ImageAnalysis.Analyzer and MLKitAnalyzer as official APIs.
  • Exposed API for setting location metadata to the saved video.
  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution() .

Bug Fixes

  • Fixed Alps k61v1_basic_ref image capture issue. The captured JPEG images from HAL have incorrect Exif metadata. The Exif metadata doesn't have the 0xffd9 or 0xffda tag to make ExifInterface correctly parse the attributes. Capturing the images in YUV format and then compressing them to JPEG output images to workaround this issue. ( I45abb )

Version 1.2.0-alpha04

27 جولای 2022

androidx.camera:camera-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

تغییرات API

  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution() . The behavior is also changed so that the value returned by this method can be overridden by the value of ImageAnalysis#setTargetResolution() . ( If1d36 )
  • Exposed API for setting location metadata to the saved video. An android.location.Location object can be set via new API androidx.camera.video.OutputOptions.Builder.setLocation(Location) . ( I313a0 , b/204197544 )

Bug Fixes

  • Fix the issue to take picture with unbind preview ( Ie70b6 , b/235119898 )
  • Fixed crash in Recorder when attempting to record while audio source is unavailable. ( I9f652 )

Version 1.2.0-alpha03

29 ژوئن 2022

androidx.camera:camera-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

تغییرات API

  • Removed the experimental annotation for ImageAnalysis.Analyzer and MLKitAnalyzer . ( I0ff22 )

Bug Fixes

  • Added auto focus default timeout 5000ms that will complete the AF part with isFocusSuccessful false if the FocusMeteringAction is not cancelled and the AF part is not converged in the duration. ( Ibc2e3 )
  • Fix the issue to take picture with unbind preview ( I1d3a2 , b/235119898 )
  • Enabled advanced extender implementation and update the CameraX support extensions-interface version to 1.2 ( I92256 )

Version 1.2.0-alpha02

1 ژوئن 2022

androidx.camera:camera-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

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

  • Expose CameraX Zero-Shutter Lag API as experimental.

تغییرات API

  • Add new capture mode CAPTURE_MODE_ZERO_SHUTTER_LAG in ImageCapture and add isZslSupported in CameraInfo to query the device capability. CAPTURE_MODE_ZERO_SHUTTER_LAG mode is aiming to provide the minimum latency for instant capture. It is implemented based on a ring buffer, which caches intermediate capture results for later reprocessing when the user presses buttons to take pictures. If {@link VideoCapture} is bound or flash mode is not OFF or OEM Extension is ON, this mode will be disabled automatically. ( I9ae74 )
  • Add ImageAnalysis.getBackgroundExecutor() method ( Icc945 )

Bug Fixes

  • Fixed ImageCapture takePicture method turns torch off on the reported devices. ( Ib5eb5 , b/228272227 )
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic.( /Ia248a , b/231701345 )

Version 1.2.0-alpha01

18 مه 2022

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

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

  • New library camera-mlkit-vision is launched

Bug Fixes

  • Fixed QualitySelector fails to record a UHD video when a fallback strategy is enabled. The issue happens when VideoCapture is bound with ImageCapture and Preview on a FULL or higher hardware level camera device. A fallback strategy of QualitySelector causes VideoCapture incorrectly to get a FHD resolution. UHD resolution is actually supported for this use case combination and should be adopted. ( I0e788 , b/230651237 )
  • Fixed NullPointerException on ImageCapture.takePicture() . ( I92366 , b/230454568 , b/229766155 )
  • Fix async pause behavior of androidx.camera.video.Recorder ( Ia8ce8 )

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video Version 1.1.0

نسخه 1.1.0

29 ژوئن 2022

androidx.camera:camera-*:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
  • Introduced new public APIs and features which including:
  • Add the official camera-video library to support video capture use cases.
  • YUV to RGB conversion and rotation capability ( ImageAnalysis.Builder.setOutputImageRotationEnabled and setOutputImageFormat )
  • Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
  • Ensures CameraX works well in foldable devices by fixing some preview issues.
  • Added a CameraState API that will be exposed through CameraInfo.
  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras
  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions are enabled.
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not.
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis .
  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking pictures.
  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector .
  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options.
  • Added an experimental API for using CameraController with external image processing libraries. eg MLKit
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera
  • Promoted several experimental APIs to formal public APIs
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental.
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter() , CameraXConfig.Builder#setMinimumLoggingLevel() , CameraXconfig.Builder#setSchedulerHandler() , CameraXConfig#getAvailableCamerasLimiter() , CameraXConfig#getMinimumLoggingLevel() , CameraXConfig#getCameraExecutor() , CameraXConfig#getSchedulerHandler() ,
  • @ExperimentalCameraFilter APIs
  • experimental exposure compensation APIs.
  • Promoted the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection , ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport.
  • Promoted the ExperimentalUseCaseGroupLifecycle to formal public APIs.
  • Changes to the existing APIs
  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri .
  • ActiveRecording has been renamed to "Recording" to reduce verbosity.
  • Changed QualitySelector creator API to a list-based API

Bug Fixes

  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set.
  • Fixed codec configuration failed due to video recording is closing
  • Fixed stretched preview/video aspect ratio when recording at FHD
  • Fixed audio/video out of sync after pause and resume on some devices
  • Fixed the issue where flash is triggered during tap-to-focus ( startFocusAndMetering ) when flash mode is auto or always_on in low-light environment.

Version 1.1.0-rc02

1 ژوئن 2022

androidx.camera:camera-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

Bug Fixes

  • Fixed NullPointerException on ImageCapture.takePicture() . ( I92366 , b/230454568 , b/229766155 )
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic. ( Ia248a , b/231701345 )

Version 1.1.0-rc01

11 مه 2022

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

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

  • Release the first RC version for camera-video, camera-view, and camera-extension

Bug Fixes

  • Fixed an issue where the video codec wasn't released when VideoCapture<Recorder> was unbound, causing subsequent uses of VideoCapture<Recorder> to fail on recording with MediaCodec.CodecException , especially on API 21-22 devices. ( Ie7f68 )
  • Fix captured images of CameraExtensionsActivity do not be deleted in ImageCaptureTest

Version 1.1.0-beta03

6 آوریل 2022

androidx.camera:camera-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.

تغییرات API

  • Made CaptureRequestOptions constructor restricted. ( I261b6 )
  • Added an experimental API for using CameraController with external image processing libraries. eg MLKit ( I4ea71 )

Bug Fixes

  • Fixed the issue that preview becomes sideway in PreviewView when activity is not restarted after rotating devices in multi-window. ( I1ea36 , b/223488673 )
  • Fix a multi-window issue that when focus changes back to the app it fails to resume the camera when (1) other high priority app opens a different camera (2) the device is Samsung Android 12 devices. ( I7e9f2 )
  • Workaround included for devices that crash when checking availability of flash. These devices will not have torch available. ( If26a3 , b/216667482 )
  • Fix AbstractMethodError issue happened when apps use extensions and enable proguard. ( I7cbaf , b/222726805 )
  • Force disable bokeh extension mode on Motorola razr 5G device which will cause black preview screen issue. ( I35d49 )
  • Fixed audio/video out of sync after pause and resume on some Samsung devices pre-API 29. ( I64622 , b/202798609 , b/202798572 )
  • Fixed audio/video out of sync after pause and resume on Sony G3125. ( I2a1a5 , b/202799148 )
  • Fixed a crash when the Recorder encountered an InvalidConfigException . However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException . If the Recorder still cannot be configured, applications will receive error callback when it starts recording. ( I89c29 , b/213617227 )

External Contribution

  • updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration ( I3366d )

Version 1.1.0-beta02

23 فوریه 2022

androidx.camera:camera-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

تغییرات API

  • Add the ability to specify physical camera ID through Camera2Interop. ( I5aed8 )

Bug Fixes

  • Fixed the stretched preview issue on Oppo Find N ( I7d004 )
  • Fixed a Galaxy J7 Prime issue that the preview is distorted. ( I4c500 )
  • Use compatible bitrate to find video encoder. ( d969052 )

Version 1.1.0-beta01

26 ژانویه 2022

androidx.camera:camera-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

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

  • From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrix.

تغییرات API

  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options. ( Ifa07d )

Bug Fixes

  • Fixed the crash when recording the video on some pre-Android O(API 26) devices. ( I88fdf , b/212328261 )
  • Fixed the incorrect AF region issue when using cameraControl#startFocusAndMetering() on front lens-facing camera in Samsung devices ( Ifbf59 , b/210548792 )
  • Use torch as flash on Pixel 3a/Pixel 3a XL to improve the speed and the captured image quality in dark ( Ib12b6 , b/211474332 )
  • Enabled applications to resume the camera when camera is interrupted by other higher priority application in the multi-window mode and the focus changes back to the application. Please note that there could be some latency(1 second to 10 seconds or more) between focus changes and camera reopened due to some framework issue. ( I4d092 )

Version 1.1.0-alpha12

15 دسامبر 2021

androidx.camera:camera-*:1.1.0-alpha12 is released. Version 1.1.0-alpha12 contains these commits.

تغییرات API

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. ( I8e286 , b/204917951 )
  • The quality constants and fallback strategy constants of QualitySelector have been changed to be represented by class objects. For example, QualitySelector.QUALITY_HD is changed to Quality.HD , and QualitySelector.FALLBACK_STRATEGY_LOWER is changed to the instance returned by FallbackStrategy.lowerQualityOrHigherThan(Quality) . The API used to create QualitySelector has been changed to a list-based API. The new API QualitySelector.fromOrderedList(List<Quality>) will refer to the order of the input quality list instead of the order created by QualitySelector.Procedure . QualitySelector.Procedure class has been removed. ( I43343 )
  • PendingRecording.withEventListener() was removed and the event listener must now be passed to PendingRecording.start() . This event listener requirement is meant to encourage handling of asynchronous errors that are reported in the VideoRecordEvent.Finalize event. ( I1e71d )
  • ActiveRecording has been renamed to Recording to reduce verbosity. ( I77ceb )

Bug Fixes

  • Fixed the issue that captured photos in FLASH_AUTO mode is underexposed in dark conditions on Pixel 3a and Pixel 3a XL ( I13f19 , b/205373142 )
  • Always use latest display size to determine the preview Resolution . ( I4a694 )
  • Filtered out cameras which do not have REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE . Cameras with REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE have the minimal set of capabilities that every camera device supports. Camera without REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE might be a camera to support special functionality and does not support standard color output. CameraX can't support the Preview , ImageCapture , ImageAnalysis or VideoCapture use cases for those cameras. Therefore, those cameras should be filtered out to prevent incorrect usage. ( Ib8cda )
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. ( I27804 )
  • Smarter heuristics are now used to select encoder settings based on OEM specified profiles. ( Iaeef0 )
  • Fixed Preview will have interlaced color lines after start UHD video recording on Pixel1. ( I833c6 , b/205340278 )

Version 1.1.0-alpha11

17 نوامبر 2021

androidx.camera:camera-*:1.1.0-alpha11 is released. Version 1.1.0-alpha11 contains these commits.

تغییرات API

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )
  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

    Add getSensorToBufferTransformMatrix API in ImageInfo. The returned matrix is a mapping from sensor coordinates to buffer coordinates, which is, from the value of CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE to (0, 0, image.getWidth, image.getHeight) . The matrix can be used to map the coordinates from one {UseCase} to another. For example, mapping coordinates of the face detected with ImageAnalysis to Preview. ( I9ff1e )

  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking picture. ( I8dcf4 )

  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri. ( I16639 )

رفع اشکال

  • Fixed the issue where flash being triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment. ( Id4c11 )
  • Disabled HDR+ on Pixel 2 XL / Pixel 3 XL in MINIMIZE_LATENCY mode to reduce latency. ( Ib6270 , b/203505523 )

External Contribution

Version 1.1.0-alpha10

13 اکتبر 2021

androidx.camera:camera-*:1.1.0-alpha10 is released. Version 1.1.0-alpha10 contains these commits.

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

  • Released androidx.camera:camera-video:1.1.0-alpha10 as the first alpha version for Video officially. There are several known issues to be fixed in the later releases.

تغییرات API

  • Added @RequiresApi(21) annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )

Bug Fixes

  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( Ibec79 )

Version 1.1.0-alpha09

29 سپتامبر 2021

androidx.camera:camera-camera2:1.1.0-alpha09 , androidx.camera:camera-core:1.1.0-alpha09 , and androidx.camera:camera-lifecycle:1.1.0-alpha09 are released. Version 1.1.0-alpha09 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )

Bug Fixes

  • Fix the issue where the captured photos are blurred in MAXIMIZE_QUALITY mode. ( I173a9 , b/193823892 )
  • Fixed a Samsung Galaxy J5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( I3aab9 )
  • When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY , the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY , the JPEG compression quality will be 100. ( Ieb37c , b/142856426 )

Version 1.1.0-alpha08

18 آگوست 2021

androidx.camera:camera-camera2:1.1.0-alpha08 , androidx.camera:camera-core:1.1.0-alpha08 , and androidx.camera:camera-lifecycle:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.

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

  • Add setOutputImageFormat API for image analysis config. User can select ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 or ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888. By default, ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 will be selected. ( I7902d )

تغییرات API

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )

Bug Fixes

  • Fixed Preview screen is too bright on the Huawei P20 Lite. This problem only occurs when certain special Preview resolutions are used together with a large zoom in value. ( Idefce , b/192129158 )
  • Fixed an issue that flash is not working on some devices when setting flash mode to FLASH_MODE_ON shortly followed by taking pictures. ( Ieb49b )
  • Fixed the issue where Preview will halt for a while when taking pictures if VideoCapture, ImageCapture and Preview are bound. ( I56197 , b/193864120 )
  • Allows ImageAnalysis to select a resolution larger than 1080p. A LIMITED-level above device can support a RECORD size resolution for ImageAnalysis when it is bound together with Preview and ImageCapture. The trade-off is the selected resolution for the ImageCapture will also need to be a RECORD size resolution. To successfully select a RECORD size resolution for ImageAnalysis, a RECORD size target resolution should be set on both ImageCapture and ImageAnalysis. This indicates that the application clearly understands the trade-off and prefers the ImageAnalysis to have a larger resolution rather than the ImageCapture to have a MAXIMUM resolution. For the definitions of RECORD, MAXIMUM sizes and more details see https://developer.android.com/reference/android/hardware/camera2/CameraDevice#regular-capture. The RECORD size refers to the camera device's maximum supported recording resolution, as determined by CamcorderProfile. The MAXIMUM size refers to the camera device's maximum output resolution for that format or target from StreamConfigurationMap.getOutputSizes(int). ( I1ee97 , b/192911449 )
  • Add the Exif info to the captured image. ( I01ff0 , b/193342619 )
  • In ImageCapture, return the URI of the saved image if the saving location is File. ( Ib5b49 , b/149241379 )
  • Fixed an issue that captured images with flash is dark on many devices. ( I4e510 )

Version 1.1.0-alpha07

21 جولای 2021

androidx.camera:camera-camera2:1.1.0-alpha07 , androidx.camera:camera-core:1.1.0-alpha07 , and androidx.camera:camera-lifecycle:1.1.0-alpha07 are released. Version 1.1.0-alpha07 contains these commits.

Bug Fixes

  • Fixed a Samsung Galaxy Note 5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment ( If6871 )
  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set. ( I538bd , b/192017012 )

Version 1.1.0-alpha06

30 ژوئن 2021

androidx.camera:camera-camera2:1.1.0-alpha06 , androidx.camera:camera-core:1.1.0-alpha06 , and androidx.camera:camera-lifecycle:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

تغییرات API

  • Promote the experimental exposure compensation APIs for camera-core ( I08ee8 )
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not. ( Ib45ae , b/188606490 )
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis. ( I2b613 , b/188600718 )
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(). ( I2ade2 )
  • Exposed the CameraProvider interface to provide access to a set of cameras. ( I1a7b1 )
  • Promote the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection , ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport. ( I7cee8 )

Version 1.1.0-alpha05

2 ژوئن 2021

androidx.camera:camera-camera2:1.1.0-alpha05 , androidx.camera:camera-core:1.1.0-alpha05 , and androidx.camera:camera-lifecycle:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

تغییرات API

  • Removed Camera2CameraFilter class. Suggest to select camera by CameraFilter and retrieve CameraCharacteristics or other Camera2 related information through Camera2CameraInfo if needed. ( Ib887c )
  • ExperimentalCameraFilter APIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 )
  • Added camera state API that's exposed through CameraInfo#getCameraState() . ( Ia86b4 )
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera ( I77f9f )

Bug Fixes

  • Fixed the issue that ListenableFuture returned in setZoomRatio and setLinearZoom cannot complete on some android 11 devices ( I716d7 )
  • Speed up Camera switching and reduce the error happen rate of the camera device ( I34c99 )
  • Replaced ExperimentalUseCaseGroupLifecycle with ExperimentalUseCaseGroup. ( I3b2ef , b/159033688 )

Version 1.1.0-alpha04

21 آوریل 2021

androidx.camera:camera-camera2:1.1.0-alpha04 , androidx.camera:camera-core:1.1.0-alpha04 , and androidx.camera:camera-lifecycle:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

Bug Fixes

  • Fixed a memory leak caused by multiple threads concurrently accessing the same collection. The memory leak may cause the Activity or Fragment to be retained by a Preview instance. ( I7b4b8 )
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental . ( Iff226 )
  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )
  • Added a CameraState API that will be exposed through CameraInfo. ( I75392 )

Version 1.1.0-alpha03

24 مارس 2021

androidx.camera:camera-camera2:1.1.0-alpha03 , androidx.camera:camera-core:1.1.0-alpha03 , and androidx.camera:camera-lifecycle:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

Bug Fixes

  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions modes is enabled. ( I0d7b1 )
  • Fixed initialization failure on UMIDIGI BISON devices ( I57d9e , b/180818665 )
  • Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )

Version 1.1.0-alpha02

24 فوریه 2021

androidx.camera:camera-camera2:1.1.0-alpha02 , androidx.camera:camera-core:1.1.0-alpha02 , and androidx.camera:camera-lifecycle:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

تغییرات API

  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras, which are either all of the device's cameras, or those selected by the CameraSelector provided in CameraXConfig.Builder.setAvailableCamerasLimiter(CameraSelector) . ( Ieac08 )

Bug Fixes

  • CameraX now tries to force open a camera on the initial attempt, this may result in CameraX stealing the camera away from other camera clients when its app has a higher priority. ( Iab069 , b/175820568 )
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
  • Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )
  • Documentation updated to recommend against using ProcessCameraProvider.configureInstance(...) from library code. ( Ib8a9f )

Version 1.1.0-alpha01

27 ژانویه 2021

androidx.camera:camera-camera2:1.1.0-alpha01 , androidx.camera:camera-core:1.1.0-alpha01 , and androidx.camera:camera-lifecycle:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

Bug Fixes

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 )
  • Resources in libraries with no explicitly declared public resources (ex. via public.xml) are now private by default. ( Ia1dcc , b/170882230 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.2

نسخه 1.0.2

29 سپتامبر 2021

androidx.camera:camera-camera2:1.0.2 , androidx.camera:camera-core:1.0.2 , and androidx.camera:camera-lifecycle:1.0.2 are released. Version 1.0.2 contains these commits.

Bug Fixes

  • Fix the issue where the captured photos are blurred in MAXIMIZE_QUALITY mode. ( I173a9 , b/193823892 )
  • Fixed a issue that captured image with flash is dark on many devices. ( I4e510 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.1

نسخه 1.0.1

21 جولای 2021

androidx.camera:camera-camera2:1.0.1 , androidx.camera:camera-core:1.0.1 , and androidx.camera:camera-lifecycle:1.0.1 are released. Version 1.0.1 contains these commits.

Bug Fixes

  • Fixed the issue that the ListenableFuture returned in setZoomRatio and setLinearZoom cannot complete on some android 11 devices ( I716d7 )

  • Fixed the issue that the camera gets stuck at closing camera state on some devices and causes black preview. ( I34c99 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.0

نسخه 1.0.0

5 مه 2021

androidx.camera:camera-camera2:1.0.0 , androidx.camera:camera-core:1.0.0 , and androidx.camera:camera-lifecycle:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • CameraX supports Preview , ImageCapture , and Analysis
  • CameraX manages the camera lifecycle within an easy to use API
  • CameraX aims to provide a compatibility layer that fixes many issues in the Android Camera Ecosystem

مسائل شناخته شده

Version 1.0.0-rc05

21 آوریل 2021

androidx.camera:camera-camera2:1.0.0-rc05 , androidx.camera:camera-core:1.0.0-rc05 , and androidx.camera:camera-lifecycle:1.0.0-rc05 are released. Version 1.0.0-rc05 contains these commits.

Bug Fixes

  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. ( I30001 )

Version 1.0.0-rc04

24 مارس 2021

androidx.camera:camera-camera2:1.0.0-rc04 , androidx.camera:camera-core:1.0.0-rc04 , and androidx.camera:camera-lifecycle:1.0.0-rc04 are released. Version 1.0.0-rc04 contains these commits.

Bug Fixes

Version 1.0.0-rc03

24 فوریه 2021

androidx.camera:camera-camera2:1.0.0-rc03 , androidx.camera:camera-core:1.0.0-rc03 , and androidx.camera:camera-lifecycle:1.0.0-rc03 are released. Version 1.0.0-rc03 contains these commits.

Bug Fixes

  • Fix format error in the document of ProcessCameraProvider#getInstance
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig.
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crash, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview.
  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. ( I52001 , b/159831206 )
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. eg frozen/sluggish preview. ( Ic12da , b/175851631 )
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig. ( Ice307 )
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. ( I1fd4e , b/177061560 )
  • Fixed ImageCapture performance regression with "File" type OutputFileOptions. ( I5164a , b/177061560 )

Version 1.0.0-rc02

27 ژانویه 2021

androidx.camera:camera-camera2:1.0.0-rc02 , androidx.camera:camera-core:1.0.0-rc02 , and androidx.camera:camera-lifecycle:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

رفع اشکال

  • Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( b/150506192 )
  • Limit number of camera reopen attempts. While attempting to recover from certains issues when opening the camera, CameraX will no longer attempt to reopen the camera indefinitely, instead it will stop after retrying for 10 seconds. I435d2

  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480. ( I2a63c , b/150506192 )

Version 1.0.0-rc01

16 دسامبر 2020

androidx.camera:camera-camera2:1.0.0-rc01 , androidx.camera:camera-core:1.0.0-rc01 , and androidx.camera:camera-lifecycle:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

تغییرات API

  • Changed CameraFilter and Camera2Filter to take in CameraInfo. ( I6883d )
  • Added experimental class Camera2CameraControl to allow interoperating with Camera2 APIs dynamically. ( I45cf3 )
  • Renamed Camera2CameraInfo#fromCameraInfo to #from. ( Ia2bd6 )
  • Added an experimental setAvailableCamerasLimiter API to CameraXConfig to allow apps to optimize the initialization latency by avoiding initializing unused cameras. ( I6cf88 )
  • Added experimental method CameraXConfig.Builder#setMinimumLoggingLevel() to allow setting a minimum logging level for CameraX logs. When not set, it defaults to Log#DEBUG . ( Ic3245 )

Bug Fixes

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930V back-facing camera. ( I5aca5 , b/159831206 )
  • Fixed the issue that taking pictures doesn't receive results when flash is always/on and the environment is dark on Samsung SM-A716 devices. ( If98b2 , b/172036589 )
  • Fixed the issue that the Preview cannot be stopped by calling Preview.setSurfaceProvider(null) . ( I3ac18 )
  • Fixed orientation issue when capturing 4:3 images on some devices. ( I0e3fb , b/171492111 )

Camera Camera2, Core, & Lifecycle Version 1.0.0-beta12

11 نوامبر 2020

androidx.camera:camera-camera2:1.0.0-beta12 , androidx.camera:camera-core:1.0.0-beta12 , and androidx.camera:camera-lifecycle:1.0.0-beta12 are released. Version 1.0.0-beta12 contains these commits.

Bug Fixes

  • Disabled auto flash on Samsung A3 devices to fix the crash when taking a photo with auto flash AE mode on Samsung A3 devices. ( Ia5fe3 , b/157535165 )
  • Fixed an issue where the preview was stretched on Nexus 4 devices running Android L (API levels 21 and 22). ( I4d407 , b/158749159 )
  • OnImageCapturedCallback#onCaptureSuccess base class implementation no longer closes the image. This is for preventing unexpected behavior to developers. Developers should not rely on super.onCaptureSuccess to close the image. ( Ifbf9c )
  • The androidx variant of the Experimental annotation has been deprecated to provide parity with Kotlin. It has been replaced by the RequiresOptIn annotation, and the Java-facing linter has been updated to support both the new Kotlin annotation and the new androidx variant. ( I52495 , b/151331381 )

Camera-Camera2 Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-camera2:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

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

  • Supports android 11 CONTROL_ZOOM_RATIO API for zoom on android 11 or later devices which contains valid CONTROL_ZOOM_RATIO_RANGE . ( I62cc6 )

Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
  • Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
  • Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is ProcessCameraProvider.bindToLifecycle() . ( Ia5411 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Core Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-core:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

New Features - Supports android 11 CONTROL_ZOOM_RATIO API for zoom on android 11 or later devices which contains valid CONTROL_ZOOM_RATIO_RANGE . ( I62cc6 )

Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. ( Ib2228 )
  • Creation of UseCases do not require initialization of CameraX to complete. All implementation specific configurations are set on UseCase once it is attached to a Camera instance which for the public API is ProcessCameraProvider.bindToLifecycle() . ( Ia5411 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Core Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-core:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Bug Fixes

  • Fix bug in validating file save destination for image capture ( I8c565 , b/167697553 )

Camera-Camera2 Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-camera2:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Bug Fixes

Camera-Camera2 Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-camera2:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

تغییرات API

  • Instead of providing static methods, Camera2CameraInfo takes in a CameraInfo instance when created to retrieve Camera2 related information from. ( I5b844 )

Bug Fixes

  • Fixed target aspect ratio issue on tablet devices. A 16:9 size should be selected when the target aspect ratio is set as AspectRatio.RATIO_16_9 . ( Ib7fcf , b/151969438 )
  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. ( I89c8c , b/160524721 )
  • Added experimental interfaces for ExposureCompensation ( If96c7 )

Camera-Core Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-core:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

تغییرات API

  • fixed the bug where viewport is marked as non-null on UseCaseGroup. Developers should be able to create a viewport without setting a viewport. ( Ie3d2e )
  • Added experimental interfaces for ExposureCompensation ( If96c7 )
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. ( I21470 )

Bug Fixes

  • Fixed the issue that flash on some devices would not turn off. It happens when the flash mode is set to FLASH_MODE_ON to take a picture, and is changed to FLASH_MODE_OFF when the flash is fired. The symptom is like torch mode enabled. ( Ib4451 , b/162568128 )
  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
  • Fixed the activity/fragment leak when an activity/fragment context is passed to ProcessCameraProvider.getInstance(Context) .

مسائل شناخته شده

  • When ViewPort is set, the crop rect of ImageCapture might be incorrect on devices who rotate the image buffer in HAL. در نسخه بعدی این مشکل برطرف خواهد شد.

Camera-Camera2 Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-camera2:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

Bug Fixes

  • Optimized bindToLifecycle to run quickly on the main thread. ( I1d57e )
  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector. ( I400c1 )
  • Fixed auto-resolution aspect ratio size grouping issue that a 16:9 mod16 size (864x480) is selected when the target resolution setting is 2016x1080 and there is another 1920x1080 16:9 size supported. ( I53167 , b/159363774 )
  • Fix the CameraControl issue where it's unable to work by a race condition ( I2279f , b/152333890 , b/160714166 )

Camera-Core Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-core:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

تغییرات API

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector . ( I400c1 )

Bug Fixes

  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )
  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

Camera-Camera2 Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-camera2:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
  • Excluded some JPEG supported sizes that will cause WYSIWYG issue on some devices. ( Ib5128 )

Camera-Core Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-core:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

تغییرات API

  • Merge FIT_CENTER , FIT_START , and FIT_END fit style with FIT . FIT means that the returned crop rect will be the max possible sensor rect. ( Ia73c3 )
  • Preview's crop rect is configured by viewport. Only the area covered by the crop rect should be visible to end users. ( I142a4 )

Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. ( I0c03a )
  • Fixed the ConcurrentModificationException exception issue when unbinding use cases. ( I371c0 )

Camera-Camera2 Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-camera2:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

Bug Fixes

  • Fixed the issue where startFocusAndMetering fails to focus successfully on Samsung Galaxy S7. ( If3be7 , b/159039233 )
  • Fix the camera can't be closed after quit the app. ( I7a7b3 )
  • Fix repeated camera switching breaks preview when using SurfaceView implementation of PreviewView ( I920ce )
  • CameraControl#startFocusAndMetering will fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )

Camera-Core Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-core:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

رفع اشکال

  • CameraX can now be configured with ProcessCameraProvider#configureInstance() before calling ProcessCameraProvider#getInstance() . This allows for customization of the CameraXConfig without requiring implementing CameraXConfig.Provider in the app's Application class. ( Ia1a8d )
  • CameraControl#startFocusAndMetering will fail if none of the specified MeteringPoint can generate valid metering rectangles. ( Id53ce )

Camera-Camera2 Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-camera2:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException that will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )
  • Fixed the crash when calling startFocusAndMetering on devices that CONTROL_AF_STATE is null. ( Ife55e , b/157084254 )

Camera-Core Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-core:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

تغییرات API

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

Bug Fixes

  • Updated javadocs of setTargetResolution and setTargetRotation . ( Iae16f )

Camera-Camera2 Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-camera2:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Bug Fixes

  • Allowed applications to set any camera2 capture request parameters via Camera2Interop without causing a crash. Please note that if there are issues that arise as a result of overriding parameters. Stability and behaviour are not guaranteed when overriding parameters using Camera2Interop. ( Ibe5a1 , b/149103700 )
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
  • Converted error log related to detached use case to a debug log on Camera2CameraImpl. ( I1a565 , b/154422490 )
  • Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound ( I0c455 , b/153249512 )
  • Fixed the issues where binding ImageCapture only: (1) Failed to take photos with MAX_QUALITY; (2) Generated bad Image quality because auto exposure does not work. ( I17782 , b/145326998 )
  • Improved reliability of re-opening camera when CameraX is disconnected by another process or codepath stealing the camera ( I1fbc3 , b/153714651 )

Camera-Core Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-core:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

تغییرات API

  • Adds an experimental API, CameraXConfig.Builder#setSchedulerHandler() for setting the handler used internally by the CameraX camera stack. This new API along with CameraXConfig.Builder#setCameraExecutor() should allow full control over the threads being used by the CameraX camera stack. ( I7bf32 , b/121160431 )

Bug Fixes

  • Fixes crash in ImageAnalysis where the ImageProxy is accessed after the ImageReaderProxy has been closed. This also makes it so that all ImageProxy received by the Analyzer must be closed before the ImageReaderProxy will be closed. ( I4b299 , b/145956416 , b/154155377 , b/156357269 )
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider() , PreviewView now internally retrieves it from the SurfaceRequest . ( If18f0 , b/154652477 )
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. ( I3bef3 , b/154767663 )
  • Fixed issue where image taken is too dark sometimes even though flash is fired. ( I5d9fa , b/149729613 )
  • Fix issue with ImageAnalysis where multiple calls to setAnalyzer/clearAnalyzer resulted in the analyzer not receiving images to analyze. ( I6169f , b/151605317 , b/153514544 )
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound ( I0c455 , b/153249512 )
  • Fixed the issue that the first camera in the supported list from CameraManager is not always selected to use. ( I4c624 , b/153418028 )
  • Fixed intermittent crash caused by setting Preview.SurfaceProvider not releasing the previously requested surface. “java.lang.IllegalStateException: Camera surface session should only fail with request cancellation” ( I8e4e7 , b/155936225 )

Camera-Camera2 Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-camera2:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixes to support the release of camera-core

Camera-Core Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-core:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCase s would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase .

Camera-Camera2 Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-camera2:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 )
  • Explicit ordering of CameraX dependencies within build.gradle is no longer required to use the default CameraX/Camera2 implementation. For cases where declaring strict dependencies is required, all CameraX dependencies can now be included in the build file. ( I46e88 )
  • Fixed the IllegalArgumentException issue happening on the devices where the display size is smaller than 640x480. ( Ife3f2 , b/150506192 )
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e )

Camera-Core Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-core:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. ( Id4281 , b/150802561 )
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations ( I78d9e )
  • Fixed an issue where the Preview use case's capture session wasn't being updated when the preview surface changed after calling Preview.setSurfaceProvider() more than once.

Camera-Camera2 Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-camera2:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Bug Fixes

  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) , and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )
  • Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using ImageCapture.setTargetRotation() . ( I474ea , b/148763432 )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )

Camera-Core Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-core:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

تغییرات API

  • Replaced the ListenableFuture on SurfaceRequest.provideSurface() with an Executor and Callback . This simplifies the API by no longer requiring handling of exceptions on provideSurface() and enforces that the provideSurface() callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. The SurfaceRequest.Result object is now used for tracking how a SurfaceRequest uses the provided Surface . ( I7854b )
  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )

Bug Fixes

  • Fixed an issue with the aspect ratio of a saved image not being correct after changing the target rotation value using ImageCapture.setTargetRotation() . ( I474ea , b/148763432 )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )
  • Updated documentation for flash mode APIs to include possible values. ( I4a3ec )

Camera-Camera2 Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-camera2:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

Bug Fixes

  • Improved stability on INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY devices by ensuring Surface s are only retained for duration of use by Camera2. ( I9dac2 )
  • Fixed underexposed preview issue on LEGACY devices by adjusting CONTROL_AE_TARGET_FPS_RANGE properly. ( 1224638 )

Camera-Core Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-core:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

تغییرات API

  • Updated ImageCapture to allow saving images to Uri and OutputStream . Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. ( Ia3bec )
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider . SurfaceProvider s no longer require developers to create their own ListenableFuture , and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView . ( I20105 )
  • Added getTargetRotation() and getTargetName() to Preview . ( Iceee7 )
  • Added getTargetRotation() , getBackpressureStrategy() , and getImageQueueDepth() in ImageAnalysis . ( I9d6d9 )
  • Added getTargetRotation() and getCaptureMode() in ImageCapture() ( I5bc17 )
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )
  • Preview and ImageCapture classes are now marked final. ( I2500b )
  • API updated, with getZoomRatio() , getMaxZoomRatio() , getMinZoomRatio() , and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. ( Ib19fe )
  • Removed API fields OPTION_TARGET_CLASS and OPTION_TARGET_NAME from CameraXConfig as they are intended for internal library use only. Removed constructor for CameraXConfig.Builder . ( I96912 )
  • Removed requirement that app must extend Application in order to initialize CameraX. CameraX will now be initialized with a default Camera2 configuration as long as the camera-camera2 artifact is included in the application's build.gradle . ( I58ff5 ) ( b/146923574 )

Camera-Camera2 Version 1.0.0-alpha09

22 ژانویه 2020

androidx.camera:camera-camera2:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .

API changes

  • Add camera2 interop path for extracting a Camera2 camera ID. You can extract the camera ID from CameraInfo using Camera2CameraInfo.extractCameraId() . The following code sample shows how to use this:

    Camera camera = provider.bindToLifecycle(...);
    String cameraId =
        Camera2CameraInfo.extractCameraId(camera.getCameraInfo());
    

    The Camera2CameraInfo class requires the ExperimentalCamera2Interop markerClass.

Camera-Core Version 1.0.0-alpha09

22 ژانویه 2020

androidx.camera:camera-core:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .

API changes

  • The SurfaceOrientedMeteringPointFactory parameter useCaseForSurface was renamed to useCaseForAspectRatio and the reference documentation was expanded.
  • FocusMeteringAction.Builder.from() methods are replaced by the constructors FocusMeteringAction.Builder() .
  • Removed DisplayOrientedMeteringPointFactory(android.content.Context, androidx.camera.core.CameraSelector, float, float) . Applications should use the constructor that takes a Display parameter and pass in the current display.
  • Javadoc improvements for focus and metering APIs regarding MeteringMode and 3A Flags, and usage of Display parameter.
  • Expanded the reference documentation for setZoomRatio and setLinearZoom .

رفع اشکال

  • Fixed issues when closing then opening cameras resulting in "Precondition" check failure.
  • Fixed a ConcurrentModificationException that could occur when using torch and zoom APIs.
  • Fixed issue to now select resolutions closer to requested resolution when a mod16 dimensions size is available.
  • startFocusMetering and cancelFocusMetering APIs now behave as documented, with correct timing and potentially returning errors when they occur.
  • Fixed issue when a specific target resolution was requested with a crop aspect ratio on a device that doesn't support such sizes. Now, a non-cropped size of sufficient resolution to bound the original request will be selected when available.

Camera-Camera2 Version 1.0.0-alpha08

18 دسامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .

مسائل شناخته شده

  • Not all Camera2 capture request options work when using the Camera2 interop. If the requested option is not supported, the session fails to start and an error like this may occur: 09-09 14:04:13.643 10117 26020 26036 E AndroidRuntime: java.lang.IllegalArgumentException: Unsupported session configuration combination

Bug Fixes

  • Fixed an issue in which a preview black screen occurred after rotating or switching the camera for API Levels 21 and 22.

تغییرات API

  • Experimental : Added a camera2 interop path for extracting the Camera ID.

Camera-Core Version 1.0.0-alpha08

18 دسامبر 2019

androidx.camera:camera-core:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .

مسائل شناخته شده

  • Apps using the PreviewView or CameraView may have the wrong aspect ratio preview. This happens after pause or resume on some FULL devices, such as the Pixel2.

Bug Fixes

  • Updated the documentation for FocusMeteringAction and CameraControl .
  • Implemented TorchControl for enableTorch() and getTorchState() .

تغییرات API

  • Hid IntDefs and moved IntDef constants outside of the IntDef definition.
  • Moved rotationDegrees from class OnImageCaptureCallback to ImageInfo .
  • Moved rotationDegrees from class Analyzer to ImageInfo .

Camera-Camera2 Version 1.0.0-alpha07

4 دسامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-camera2 contains these commits

  • Camera2Config is now available for use with initializing and configuring a Camera2-based implementation for CameraX. More details on how to use this in initialization are in the camera-core section of the release notes.
  • The camera2 interop functionally is now marked as experimental and moved to a separate package, androidx.camera.camera2.interop.

Camera-Core Version 1.0.0-alpha07

4 دسامبر 2019

androidx.camera:camera-core:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-core contains these commits

Note that there are some substantial changes in this Alpha release as we prepare for Beta. We recommend you review the changes and share any feedback you may have on the CameraX Google group . For those developers using CameraX in apps that are on the Play store, we recommend waiting for the formal Beta release before upgrading the library within your applications.

API changes

  • Important : CameraX initialization has changed. Applications should implement CameraXConfig.Provider , and use the default Camera2Config provided by androidx.camera.camera2 . A typical usage is:

    import androidx.camera.camera2.Camera2Config
    import androidx.camera.core.CameraXConfig
    
    public class MyCameraXApplication : Application(),  CameraXConfig.Provider {
        override fun getCameraXConfig(): CameraXConfig {
                return Camera2Config.defaultConfig(this)
        }
    }
    
  • The CameraX class has been removed. The bindToLifecycle() , unbind() , unbindAll() , isBound() , and hasCamera() previously provided by the CameraX class call are now available via the ProcessCameraProvider .

  • A per-process instance of ProcessCameraProvider is obtained asynchronously using the static method ProcessCameraProvider.getInstance() , which returns a listenable future, which provides the ProcessCameraProvider on completion. Here it is shown in onCreate() for a typical usage. You can place calls to getInstance() later in the activity's lifecycle to defer initialization latency to a later time (such as when a user action opens a camera UI).

    import androidx.camera.lifecycle.ProcessCameraProvider
    import com.google.common.util.concurrent.ListenableFuture
    
    class MainActivity : AppCompatActivity() {
       private lateinit var cameraProviderFuture : ListenableFuture<ProcessCameraProvider>
       override fun onCreate(savedInstanceState: Bundle?) {
           cameraProviderFuture = ProcessCameraProvider.getInstance(this);
      }
    
  • A listener can be added to the ListenableFuture returned by getInstance() . This ensures the camera provider can be retrieved from the Future without blocking on Future.get()

    cameraProviderFuture.addListener(Runnable {
      val cameraProvider = cameraProviderFuture.get()
      cameraProvider.bindToLifecycle(...)
    }, ContextCompat.getMainExecutor(this))
    
  • Camera selection is now done by a camera selector, instead of per-use case

    val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
    
  • CameraProvider.bindToLifecycle is given the lifecycle owner, the camera selector, and use cases, which are then bound to the given lifecycle owner and run for the selected camera.

    cameraProvider.bindToLifecycle(this as LifecycleOwner,
           cameraSelector, preview, imageAnalysis)
    
  • Use case “Config” classes are removed. Instead, build use cases directly, setting options on each use case builder. به عنوان مثال:

    preview = Preview.Builder().setTargetAspectRatio(AspectRatio.RATIO_16_9).build()
    
  • The Preview use case has been updated to accept a surface created and managed by the application to ensure Android best practices. It is highly recommended to use the PreviewView view class provided in the camera-view package.

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • See documentation for attaching an app-managed surface. In these cases the app manages the lifecycle of the surface.

  • Important : The ImageAnalysis Analyzer method implementation must call image.close() on received images when finished using them. Otherwise, new images may not be received or the camera may stall, depending on back pressure setting. Refer to the reference docs for details.

  • ImageAnalysis ImageReaderMode is now changed to a backpressure strategy intdef .

  • ImageProxy.getImage() is marked as experimental. Applications should annotate usage for example via @androidx.camera.core.ExperimentalGetImage

  • The UIThread annotation requirement for the Analyzer has been removed.

  • The ImageAnalysis.clearAnalyzer() function is added for removing an analyzer.

  • Listeners with more than 1 method have been renamed to Callback:

    • ImageCapture.OnImageCapturedListener is now ImageCapture.OnImageCapturedCallback
    • ImageCapture.OnImageSavedListener is now ImageCapture.OnImageSavedCallback
    • VideoCapture.OnVideoSavedListener is now VideoCapture.OnVideoSavedCallback
  • Enums have changed to IntDef

  • Zoom controls have been added:

    • CameraControl.setLinearZoom()
    • CameraControl.setZoomRatio()
    • CameraInfo.getLinearZoom()
    • CameraInfo.getMaxZoomRatio()
    • CameraInfo.getZoomRatio()
  • CameraInfo.hasFlashUnit() is added to determine if flash/torch hardware is present.

  • CameraInfo.isFlashAvailable() has been removed. Torch overrides flash functionality. More detail is included in the reference documentation .

  • ImageCapture.Metadata fields are replaced by get/set/is accessors.

  • startFocusMetering and cancelFocusMetering now return ListenableFutures which represent the asynchronous operation of the call.

  • MeteringPoints are now functioning as handles to metering actions, and are produced by factories. Apps should use the existing factories rather than custom factories.

مسائل رفع شد

  • Fixed issue when taking a picture on resuming (after a previous pause had take pictures pending completion).
  • Known Issue: CameraControl.enableTorch() is functional but the returned ListenableFuture<Void> is always an immediate complete(success) future, even if there is no flash unit. Future versions will fix this to the final behavior: When there is no flash unit, enableTorch(true) fails immediately (won't send request to CaptureSession ), and TorchState remain Off.
  • Known Issue: startFocusAndMetering and cancelFocusAndMetering start and cancel focus metering, but return an immediately completed (success) future not representing the documented behavior. The FocusMeteringResult from ListenableFuture<FocusMeteringResult> CameraControl.startFocusAndMetering() is a fake result which isFocusSuccessful() and is always "false," differing from intended, documented behavior.
  • Known Issue: A metering point factory for use with PreviewView touch events is being developed. For now, apps connecting custom managed surfaces can use the existing metering point factories, and otherwise no touch focus functionality is available for PreviewView .

Camera-Camera2 and Camera-Core Version 1.0.0-alpha06

9 اکتبر 2019

androidx.camera:camera-camera2:1.0.0-alpha06 and androidx.camera:camera-core:1.0.0-alpha06 are released. These are the commits included in camera-camera2:1.0.0-alpha06 and these are the commits included in camera-core:1.0.0-alpha06 .

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

Changes to setting aspect ratios:

  • setTargetAspectRatioMode() was added and accepts an enum argument. This sets the Aspect Ratio Mode with options RATIO_4_3 or RATIO_16_9 instead of an arbitrary aspect ratio. This closer reflects the fact that only certain aspect ratios are provided from the camera, rather than any arbitrary ratio.
    • Currently, the only available ratios are 16:9 and 4:3. In the case of 1:1, only certain devices have this available from the camera, and then only at limited resolutions. Applications designing a 1:1 interface or processing should use the more flexible 16:9 or 4:3 choices and crop the display or process a subregion.
    • These aspect ratios are oriented to use the maximum sensor area.
  • getTargetAspectRatio() was added to use case config APIs, returning the aspect ratio the use case output is targeted for.
  • The method setTargetAspectRatio(Rational aspectRatio) has been changed for ImageCapture to setTargetAspectRatioCustom(Rational aspectRatio) . When set, the ImageCapture output crops accordingly.

Executor APIs

  • The following functions accept an executor parameter, which allows the app to control which executor the function runs on.
    • Preview.setOnPreviewOutputUpdateListener() API. If the executor is not present for that function, it executes on the main thread.
    • Preview.setOnPreviewOutputUpdateListener
    • FocusMeteringAction.Builder.setAutoFocusCallback
    • ImageAnalysis.setAnalyzer
    • ImageCapture.takePicture
    • CameraView.takePicture
    • CameraView.startRecording
    • VideoCapture.startRecording

CameraInfo added with check Flash Available and Sensor Rotation APIs

  • Added CameraInfo and a getCameraInfo method, which allows apps to check if a lens facing CameraInfo is available and if a flash is available on that camera. به عنوان مثال:

    try {
        CameraInfo cameraInfo = CameraX.getCameraInfo(currentCameraLensFacing);
        LiveData<Boolean> isFlashAvailable = cameraInfo.isFlashAvailable();
        flashToggle.setVisibility(isFlashAvailable.getValue() ? View.VISIBLE : View.INVISIBLE);
    } catch (CameraInfoUnavailableException e) {
        Log.w(TAG, "Cannot get flash available information", e);
        flashToggle.setVisibility(View.VISIBLE);
    }
    
  • CameraInfo.getSensorRotationDegrees() was added. It provides the camera sensor orientation relative to the device's natural orientation, or for convenience, relative to an orientation described by a Surface rotation (which describes an orientation relative to natural orientation).

API changes and bug fixes

  • Aspect Ratios: For each use case, applications should call only one of setTargetResolution() or setTargetAspectRatio() . Calling both on the same builder returns an error.
    • In general it's recommended to use setTargetAspectRatio() based on the application's UI design. Specific resolutions are based on the use case. For example, preview is near screen resolutions and image capture provides high resolution stills. See the automatic resolutions table for more information.
    • Use setTargetResolution() for more specific cases, such as when minimum (to save computation) or maximum resolutions (for processing details) are required.
  • Executor API: Removed the setCallbackHandler() call from use case configuration APIs. Instead, applications can set the executor as a parameter in various other APIs that set a callback.
  • Updated null annotations for various functions.
  • Fixed an issue that caused java.lang.IllegalStateException at Camera$StateCallback.onError to be thrown when opening the camera.
  • Fixed issue where resolutions would be selected that were too small (less than 640x480) when app is requesting larger or default resolutions resulting in a blocky or blurry preview image. Applications that specifically need smaller resolutions can explicitly request them.
  • Fixed an issue where the camera would show black screen (failed to start the camera) after returning from an intent that launched another camera application.
  • Fixed a bug that threw the following error when apps are repeatedly started or stopped; java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
  • Fixed the following error that occurs when disabling ImageAnalysis: java.lang.IllegalStateException: maxImages (4) has already been acquired, call #close before acquiring more.
  • Added additional tests for camera disconnect flow.
  • Improved test system robustness when running back-to-back camera tests.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha05

5 سپتامبر 2019

androidx.camera:camera-camera2:1.0.0-alpha05 and androidx.camera:camera-core:1.0.0-alpha05 are released. These are the commits included in camera-camera2:1.0.0-alpha05 and these are the commits included camera-core:1.0.0-alpha05 .

  • API Change: Renamed use case error variables:

    • ImageCapture.UseCaseError is renamed ImageCapture.ImageCaptureError
    • VideoCapture.UseCaseError is renamed VideoCapture.VideoCaptureError
  • Added CameraControl API w/Tap-to-Focus APIs

    • Added API to get a CameraControl from CameraX for a camera, selected by lens facing:

      CameraX.getCameraControl(LensFacing lensFacing)

    • Added MeteringPointFactory , MeteringPoint , MeteringMode , and FocusMeteringAction to run Tap-to-Focus:

      MeteringPointFactory factory = new SensorOrientedMeteringPointFactory(width, height);
      MeteringPoint point = factory.createPoint(x, y);
      FocusMeteringAction action = FocusMeteringAction.Builder.from(point,
                                       MeteringMode.AF_ONLY)
          .addPoint(point2, MeteringMode.AE_ONLY) // could have many
          .setAutoFocusCallback(new OnAutoFocusListener(){
              public void onFocusCompleted(boolean isSuccess) {
              }
          })
          // auto calling cancelFocusAndMetering in 5 sec.
          .setAutoCancelDuration(5, TimeUnit.Second)
          .build();
      
    • Added API for CameraControl to start and cancel focus metering:

      getCameraControl(lensFacing).startFocusAndMetering(action); getCameraControl(lensFacing).cancelFocusAndMetering();

    • Added APIs for Metering Point Factories that assist translating tap coordinates to sensor coordinates, based on view classes:

      MeteringPointFactory factory = new TextureViewMeteringPointFactory(textureView); MeteringPointFactory factory = new DisplayOrientedMeteringPointFactory(context, lensFacing, viewWidth, viewHeight);

  • Enforce calling the following methods on the Main (UI) thread, throwing an IllegalStateException when they are not. Future versions will allow usage on other threads and ensure serialization.

    • CameraX.bindToLifecycle()
    • CameraX.unbind()
    • CameraX.unbindAll()
    • ImageAnalysis.setAnalyzer()
    • ImageAnalysis.getAnalyzer()
    • ImageAnalysis.removeAnalyzer()
    • Preview.removePreviewOutputListener()
    • Preview.getOnPreviewOutputUpdateListener()
    • Preview.setOnPreviewOutputUpdateListener()
  • Various config settings now accept null parameters and corresponding getters may return null.

  • Fixed issue when testing on emulators that do not support AF/AE/AWB settings.

  • Fixed crash bug on rotation while analyzing image.

  • Fixed bug where preview appears black on start (no camera data), after rotation or switching between front and back cameras.

  • Removed testing for multiple concurrent image analysis use cases. To ensure compatibility, applications should only attach a single image analysis use case.

  • Added initial robolectric tests for fake camera in camera-testing suite (WIP).

  • Camera2Inititalizer test removed, as its coverage was unclear/misleading.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha04

7 آگوست 2019

androidx.camera:camera-camera2:1.0.0-alpha04 and androidx.camera:camera-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits .

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

Changes to Aspect Ratio and Resolution selection

CameraX's goal is to successfully initialize a camera session. This means CameraX compromises on resolution/aspect ratios based on device capability, in order to start a capture session as its first goal, and so exact requests may not be honored. این ممکن است به دلیل:

  • Devices not supporting the requested resolution
  • Compatibility issues such as on LEGACY devices where certain resolutions must be used to operate correctly
  • On some devices, certain formats are only available at certain aspect ratios
  • A preference for a “nearest mod16” for JPEG or video encoding. See CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP

Although CameraX creates and manages the session, you should always check the returned image sizes on the use case output in your code and adjust accordingly.

Some changes have been made for setting resolutions and aspect ratios, intended to make the API more clear:

  • Preview use case is now considered to have a default 4:3 aspect ratio when none is set.
  • When CameraX internally considers changes to requested resolutions and aspect ratios based on device capability, it first tries to maintain the same aspect ratio (as determined by any of setTargetAspectRatio or setTargetResolution calls)
  • A “Nearest mod16” version of the resolution is considered as the same aspect ratio.

ImageAnalysis Non-Blocking Mode

  • The behaviour of ImageReaderMode.ACQUIRE_LATEST_IMAGE is now non-blocking. It acquires the latest image in the queue, but discards unused images continuously to allow the camera pipeline to avoid blocking.
  • The analyzer can hold a single image indefinitely without stalling the pipeline.
  • If the application provides an executor which then blocks, the ImageAnalysis use case blocks.
  • The default executor set internally behaves as a non-blocking executor.

Bug Fixes

  • Fixed timeout issues waiting for 3A convergence when capturing images on devices with no auto-focus, auto exposure, and auto-whitebalance
  • Fixed issue when rapidly taking pictures with ImageCapture. Fixes error: java.lang.IllegalStateException: maxImages (2) has already been acquired
  • Fixed issue when setLensFacing was not called for a use case, resulting in java.lang.IllegalArgumentException: Unable to get camera ID for use case .
  • Fixed issue where LEGACY device required specific aspect ratio as maximum JPEG resolution
  • Fixed issue when backgrounding the app while camera is opening
  • Fixed issue on API < 25, removing error checkAndUpdateEglState: invalid current EGLDisplay
  • Fixed issue when unbinding preview after enabling and starting extensions
  • Build artifacts for camera-view and camera-extensions are now published as alpha versions

Camera-Camera2 and Camera-Core Version 1.0.0-alpha03

2 جولای 2019

androidx.camera:camera-core:1.0.0-alpha03 and androidx.camera:camera-camera2:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits .

تغییرات API

  • Added javadoc clarification for “target” in setTarget configuration calls

Camera-Core

  • Fixed unconfigured Input/Output Surface crash on rapid open/close or bind/unbind
  • Move to new Futures implementations
  • Test fixes for more robust testing
  • Core integration test now shows capture time for photos
  • Developed internal compat class for Executors
  • Timing test app capture images waits for previous to complete & improved stability

برنامه های افزودنی

  • Added versioning checks
  • Additional test coverage - extension event callbacks
  • Improvements for internally corresponding image and meta-data
  • Fixes to mode switching in test app

Camera-Camera2 and Camera-Core Version 1.0.0-alpha02

5 ژوئن 2019

androidx.camera:camera-core:1.0.0-alpha02 and androidx.camera:camera-camera2:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits .

رفع اشکال

  • Fixed div by zero issue when using emulator
  • Fixed NullPointerException/Surface Abandoned error occurring on some devices when quickly taking photos while unbinding and rebinding use cases rapidly.
  • Fixed internal issue to ensure capture request updates affect all surfaces consistently
  • Stability improvements when restarting use cases in new app instances
  • Internal architecture changes to prepare for supporting executors in the API
  • Additional Javadoc clarifications on CameraX class and lifecycle management
  • Added instrumented testing for Antelope performance test app
  • Remove need for '-keepattributes Signature' in app Proguard config

Camera-Camera2 and Camera-Core 1.0.0-alpha01

7 مه 2019

androidx.camera:camera-core:1.0.0-alpha01 and androidx.camera:camera-camera2:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits .

Camera-Lifecycle Version 1.0.0-beta11

14 اکتبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

Bug Fixes

  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-Lifecycle Version 1.0.0-beta10

23 سپتامبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Bug Fixes

Camera-Lifecycle Version 1.0.0-beta09

16 سپتامبر 2020

androidx.camera:camera-lifecycle:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

Camera-Lifecycle Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-lifecycle:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

Bug Fixes

  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

Camera-Lifecycle Version 1.0.0-beta07

22 جولای 2020

androidx.camera:camera-lifecycle:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

Camera-Lifecycle Version 1.0.0-beta06

24 ژوئن 2020

androidx.camera:camera-lifecycle:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

تغییرات API

  • CameraX can now be configured with ProcessCameraProvider#configureInstance() before calling ProcessCameraProvider#getInstance(). This allows for customization of the CameraXConfig without requiring implementing CameraXConfig.Provider in the app's Application class. ( Ia1a8d )

Camera-Lifecycle Version 1.0.0-beta05

10 ژوئن 2020

androidx.camera:camera-lifecycle:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

Camera-Lifecycle Version 1.0.0-beta04

27 مه 2020

androidx.camera:camera-lifecycle:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Camera-Lifecycle Version 1.0.0-beta03

15 آوریل 2020

androidx.camera:camera-lifecycle:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCase s would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase .
  • Fixes to support the release of camera-core

Camera-Lifecycle Version 1.0.0-beta01

26 فوریه 2020

androidx.camera:camera-lifecycle:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Bug Fixes

  • Fixed documentation to note that when obtaining a ProcessCameraProvider during initialization, a default configuration is used and that extending Application is optional. ( I5e395 )

Camera-Lifecycle Version 1.0.0-beta02

1 آوریل 2020

androidx.camera:camera-lifecycle:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 and camera-core:1.0.0-beta02 artifacts.

Camera-Lifecycle Version 1.0.0-alpha10

10 فوریه 2020

androidx.camera:camera-lifecycle:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

تغییرات API

  • Added @MainThread annotation to BindToLifecycle, unbind and unbindAll methods. ( I990d2 )

Camera-Lifecycle Version 1.0.0-alpha03

22 ژانویه 2020

androidx.camera:camera-lifecycle:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Lifecycle Version 1.0.0-alpha02

18 دسامبر 2019

androidx.camera:camera-lifecycle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .

Dependency changes

  • Updated to use androidx.camera:camera-core:1.0.0-alpha08 .

Camera-Lifecycle Version 1.0.0-alpha01

4 دسامبر 2019

androidx.camera:camera-lifecycle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 of camera-lifecycle contains these commits

API notes

  • The camera-lifecycle artifact is added, providing LifeCycleCameraProvider interface, and an implementation called ProcessCameraProvider which provides many of the functions of the previous CameraX class in core and is obtained via a getInstance() method.
  • Apps should include the camera-lifecycle library to use CameraX.
  • See notes in the camera-core section for how to perform initialization of CameraX using a ProcessCameraProvider .

Camera-Extensions and Camera-View Version 1.0.0

Version 1.0.0-alpha32

15 دسامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha32 and androidx.camera:camera-view:1.0.0-alpha32 are released. Version 1.0.0-alpha32 contains these commits.

تغییرات API

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. ( I8e286 , b/204917951 )
  • Update api files for camera-extensions artifact. ( If683a , b/161377155 )

Bug Fixes

  • Disallow the app to enable extension modes when binding VideoCapture . CameraX Extensions only support ImageCapture and Preview . The VideoCapture can't be supported yet. If the app binds VideoCapture and enables any extension mode, an IllegalArgumentException will be thrown. ( I0d87b )
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. ( I27804 )
  • Renamed ExtensionsManager#getInstance API as getInstanceAsync because it returns ListenableFuture . The Async suffix of the function name can clearly present that it is an async function. ( I279d2 )
  • Remove resolution parameter from the ExtensionsManager#getEstimatedCaptureLatencyRange API since users can't know which sizes are supported for the ImageCapture use case and can't distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter. ( I74bb2 )
  • Move CameraProvider parameter of ExtensionsManager functions to the getInstance() API. So that the users don't need to input the CameraProvider parameter each time when calling the ExtensionsManager functions. ( Ic7e48 )

Version 1.0.0-alpha31

17 نوامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha31 and androidx.camera:camera-view:1.0.0-alpha31 are released. Version 1.0.0-alpha31 contains these commits.

تغییرات API

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. ( I105d0 )

Bug Fixes

  • Fixed a crash when switching extensions mode quickly on certain devices. ( Iebbef )

Version 1.0.0-alpha30

13 اکتبر 2021

androidx.camera:camera-extensions:1.0.0-alpha30 and androidx.camera:camera-view:1.0.0-alpha30 are released. Version 1.0.0-alpha30 contains these commits.

تغییرات API

  • Added @RequiresApi(21) annotation to all CameraX classes and dropped minSdkVersion from AndroidManifest.xml. This will allow camera-core to be easily integrated into applications that have a minSdkVersion less than 21, but want to conditionally use code paths that rely on API 21 and higher. For any application with minSdkVersion 21 or higher, this change requires no action. ( Ie7f2e , b/200599470 )

Bug Fixes

  • Fixed the AbstractMethodError issue which happens when proguard is enabled. ( Iae468 , b/201177844 )

Version 1.0.0-alpha29

29 سپتامبر 2021

androidx.camera:camera-extensions:1.0.0-alpha29 and androidx.camera:camera-view:1.0.0-alpha29 are released. Version 1.0.0-alpha29 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. ( I01ef5 )
  • remove RotationProvider#removeAllListeners() . Please use RotationProvider#removeListener(...) instead. ( Id9d4a )
  • Updated the RotationReceiver class: changed set/clear Listener to add/remove/removeAll, remove the setListener variation that uses the main thread by default and added annotation of methods. ( Ib1669 )

Bug Fixes

  • Renamed ExtensionMode#BEAUTY to FACE_RETOUCH to correctly present what is done by the extension mode. ( I61f54 , b/198515274 )
  • Fixed the issue that camera is closed unexpectedly when multiple CameraController and PreviewView are used in one Activity. ( Ibfd18 , b/197539358 )

Version 1.0.0-alpha28

18 آگوست 2021

androidx.camera:camera-extensions:1.0.0-alpha28 and androidx.camera:camera-view:1.0.0-alpha28 are released. Version 1.0.0-alpha28 contains these commits.

تغییرات API

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. ( I17b85 )
  • refactored RotationListener and renamed it to RotationProvider. It continues to provide the same feature with slightly different API. ( Idffc5 )
  • rename TAP_TO_FOCUS_UNSUCCESSFUL to TAP_TO_FOCUS_NOT_FOCUSED and TAP_TO_FOCUS_SUCCESSFUL to TAP_TO_FOCUS_FOCUSED. Made OutputSize final ( I099fa )

Bug Fixes

  • Removed deprecated <EffectName><UseCase>Extender classes, ExtensionsErrorListener and related ExtensionsManager APIs. ( I3b8c3 )

Version 1.0.0-alpha27

21 جولای 2021

androidx.camera:camera-extensions:1.0.0-alpha27 and androidx.camera:camera-view:1.0.0-alpha27 are released. Version 1.0.0-alpha27 contains these commits.

تغییرات API

  • Promoted the viewport API out of experimental. Remove the experimental annotation of the API. ( I717ea )
  • Renamed CoordinateTransform#getTransform to CoordinateTransform#transform and update JavaDoc ( I864ae )

Bug Fixes

  • Fixed PreviewView PERFORMANCE mode stretch issue when using it together with Compose UI. ( Ie1137 , b/183864890 )

Version 1.0.0-alpha26

30 ژوئن 2021

androidx.camera:camera-extensions:1.0.0-alpha26 and androidx.camera:camera-view:1.0.0-alpha26 are released. Version 1.0.0-alpha26 contains these commits.

تغییرات API

  • add a new method CameraController#getTapToFocusState() that exposes the latest tap-to-focus result. ( Iaccb0 )
  • adding more camera-core features to CameraController: getters/setters for target aspect ratio, target resolution, capture mode, CameraControl and custom executors. ( Iea8f2 )
  • add a RotationReceiver class that receives Surface rotation changes. This can be used to set the target rotation when the device is in fixed portrait/landscape mode. ( Ib278f )
  • Exposed new getEstimatedCaptureLatencyRange public APIs in ExtensionsManager class. ( I6a8ec )
  • Deprecated ExtensionsErrorListener. Currently, this interface is only used to monitor whether a Preview or ImageCapture is lacking when enabling extension modes. CameraX will automatically add an extra Preview or ImageCapture to make the extension functions work well. After that, no error will be reported via this interface. ( I47d9e )
  • Exposed new ExtensionsManager getInstance, isExtensionAvailable and getExtensionEnabledCameraSelector public APIs and deprecated old <EffectName><UseCase>Extender classes and related APIs. ( I329e6 )

Version 1.0.0-alpha25

2 ژوئن 2021

androidx.camera:camera-extensions:1.0.0-alpha25 and androidx.camera:camera-view:1.0.0-alpha25 are released. Version 1.0.0-alpha25 contains these commits.

تغییرات API

  • ExperimentalCameraFilter APIs are now out of experimental stage and become formal APIs. They can be used without annotated OptIn. ( I4bc94 )
  • Add a utility that transforms coordinates between use cases. Example usage: transforming the coordinates detected in ImageAnalysis use case and highlight the detected object in preview. ( I63ab1 , b/137515129 )
  • Removed CameraView . CameraView has been replaced by CameraController . Please see the migration guide for how to migrate.: ( Id5005 )

Bug Fixes

  • Replaced ExperimentalUseCaseGroupLifecycle with ExperimentalUseCaseGroup . ( I3b2ef , b/159033688 )

Version 1.0.0-alpha24

21 آوریل 2021

androidx.camera:camera-extensions:1.0.0-alpha24 and androidx.camera:camera-view:1.0.0-alpha24 are released. Version 1.0.0-alpha24 contains these commits.

Bug Fixes

  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental . ( Iff226 )
  • Fixed the PreviewView stretched issue on Samsung J5 Prime ( Ib10b6 )

Camera Extensions & View Version 1.0.0-alpha23

24 مارس 2021

androidx.camera:camera-extensions:1.0.0-alpha23 and androidx.camera:camera-view:1.0.0-alpha23 are released. Version 1.0.0-alpha23 contains these commits.

تغییرات API

  • CameraView is being deprecated. Please use LifecycleCameraController instead. See the migration guide ( Idac2c )
  • Added FloatRange annotation to setLinearZoom() ( I69971 )

Bug Fixes

  • Pinned camera-view dependencies to rely on 1.0.0 artifacts. Depending on camera-view will not longer cause gradle's dependency resolution to automatically upgrade camera-core, camera-camera2 and camera-lifecycle to the latest 1.1.0 artifacts, though camera-view is still compatible with those artifacts if they are explicitly set to use 1.1.0. ( Ic8fa1 , b/181599852 )
  • Fixed Samsung A3 stretched preview in PreviewView. ( Iacb30 , b/180121821 )
  • Fixed the issue where if camera selector cannot be set before camera is initialized. ( Ic8bd0 )

Camera Extensions & View Version 1.0.0-alpha22

24 فوریه 2021

androidx.camera:camera-extensions:1.0.0-alpha22 and androidx.camera:camera-view:1.0.0-alpha22 are released. Version 1.0.0-alpha22 contains these commits.

تغییرات API

Bug Fixes

  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. ( I5ae39 )

Camera Extensions & View Version 1.0.0-alpha21

27 ژانویه 2021

androidx.camera:camera-extensions:1.0.0-alpha21 and androidx.camera:camera-view:1.0.0-alpha21 are released. Version 1.0.0-alpha21 contains these commits.

Releasing to support other camera library artifacts.

Camera Extensions & View Version 1.0.0-alpha20

16 دسامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha20 and androidx.camera:camera-view:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions & Camera-View Version 1.0.0-alpha19

11 نوامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha19 and androidx.camera:camera-view:1.0.0-alpha19 are released. Version 1.0.0-alpha19 contains these commits.

Bug Fixes

  • @ExperimentalVideo annotation was introduced to camera-view. This annotation marks APIs which expose experimental video functionality which is subject to change as the features are fully developed. Any method using these APIs should use the @UseExperimental annotation with ExperimentalVideo as the markerClass . ( I6d729 )

Camera-Extensions Version 1.0.0-alpha18

14 اکتبر 2020

androidx.camera:camera-extensions:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

Bug Fixes

  • Improved the latency of CameraX initialization and bindToLifecycle ( I61dc5 )
  • <UseCase>.getTargetRotation() will return Surface.ROTATION_0 if called before being attached to a Camera instance unless a targetRotation has been set on the Builder or UseCase. ( I80fcd )

Camera-View Version 1.0.0-alpha18

14 اکتبر 2020

androidx.camera:camera-view:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions Version 1.0.0-alpha17

23 سپتامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

Bug Fixes

Camera-View Version 1.0.0-alpha17

23 سپتامبر 2020

androidx.camera:camera-view:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

Bug Fixes

Camera-Extensions Version 1.0.0-alpha16

16 سپتامبر 2020

androidx.camera:camera-extensions:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

Bug Fixes

  • Added method in ExtensionsManager to get an Extensions object which is used to enable and query extensions on Camera instances ( I4fb7e )

Camera-View Version 1.0.0-alpha16

16 سپتامبر 2020

androidx.camera:camera-view:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

API Changes

  • Removed PreviewView#setDeviceRotationForRemoteDisplayMode() and PreviewView#getDeviceRotationForRemoteDisplayMode() . The two methods are for customizing preview rotation, when desired rotation is not display rotation, eg remote display. To handle the non-display preview rotation now, set the desired rotation with Preview#setTargetRotation() and the newly added PreviewView#getViewPort(targetRotation) . ( Ib62cc )
  • Renamed createSurfaceProvider() to getSurfaceProvider() . The method will always return the same instance of Preview.SurfaceProvider. ( Iff83c )

Bug Fixes

  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. ( I0c3cc )
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. ( I21470 )

مسائل شناخته شده

  • In PreviewView, OnClickListener#onClick() is not invoked when the end user clicks PreviewView. The touch event is mistakenly consumed by PreviewView#onTouchEvent(). The issue will be fixed in the next release.
  • The MeteringPoint obtained from PreviewView#getMeteringPointFactory() may be wrong if ViewPort is used with PreviewView.

Camera-Extensions Version 1.0.0-alpha15

August 19, 2020

androidx.camera:camera-extensions:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

Bug Fixes

  • The ExtensionsManager.init() method now takes in a Context as a parameter instead of having 0 args. ( Ife754 )
  • Initialization should no longer crash when using a Context that does not return an Application object from Context.getApplicationContext() . ( I3d3c9 , b/160817073 )

    Camera-View Version 1.0.0-alpha15

    August 19, 2020

androidx.camera:camera-view:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

Bug Fixes

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo instance instead of a CameraSelector so there is a direct mapping to which Camera the factory will be generating points for. All classes which use DisplayOrientedMeteringPointFactory also take in a CameraInfo instance instead of CameraSelector . ( I400c1 )
  • Removed TextureViewMeteringPointFactory . PreviewView provides a public API ( createMeteringPointFactory() ) to create a metering point factory regardless of whether it's using a TextureView or SurfaceView . ( Ide693 )
  • rename PreviewView's SURFACE_VIEW / TEXTURE_VIEW implementation modes to PERFORMANCE / COMPATIBLE . PERFORMANCE is the old SURFACE_VIEW mode, and COMPATIBLE is the old TEXTURE_VIEW mode. ( I0edc2 )
  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. ( I28499 )

Camera-Extensions Version 1.0.0-alpha14

22 جولای 2020

androidx.camera:camera-extensions:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-View Version 1.0.0-alpha14

22 جولای 2020

androidx.camera:camera-view:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-Extensions Version 1.0.0-alpha13

24 ژوئن 2020

androidx.camera:camera-extensions:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

Bug Fixes

  • Added experimental interfaces for filtering cameras by camera ID and CameraCharacteristics. ( I28f61 )

Camera-View Version 1.0.0-alpha13

24 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

Bug Fixes

  • CameraView no longer crashes with an IllegalArgumentException when binding to a LifecycleOwner whose Lifecycle transitions to a DESTROYED state shortly after being bound. Binding Lifecycles in a DESTROYED state will not attempt to open the camera. ( I7c2b8 )
  • PreviewView StreamState is now available through CameraView.getPreviewStreamState() ( I21a2b )

Camera-Extensions Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-extensions:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. ( I9909a , b/149413835 )

Camera-View Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )

Camera-Extensions Version 1.0.0-alpha11

27 مه 2020

androidx.camera:camera-extensions:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

Camera-View Version 1.0.0-alpha12

10 ژوئن 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

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

API Changes

Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. ( I9b500 , b/157659818 )

Camera-View Version 1.0.0-alpha11

27 مه 2020

androidx.camera:camera-view:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • Add PreviewView#getPreviewStreamState API which allows apps to observe if preview is streaming or not. When the PreviewView is in TEXTURE_VIEW mode, the STREAMING state also guarantees the preview image is visible. ( Ic0906 , b/154652477 )
  • Added PreviewView#setDeviceRotationForRemoteDisplayMode() API to provide device rotation for transform calculations if the application is running in remote display mode. ( I59b95 , b/153514525 )

Bug Fixes

  • Fixed the preview distortion issue on FULL/LIMITED/LEVEL_3 cameras running android 7.0 and below. Forced use ImplementationMode#TEXTURE_VIEW mode when the android version is 7.0 or below. ( I83e30 , b/155085307 )
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider() , PreviewView now internally retrieves it from the SurfaceRequest . ( If18f0 , b/154652477 )
  • Fixed the VideoCapture's default aspect ratio to be 16:9 in CameraView. ( Ie6a7b , b/153237864 )
  • Fix PreviewView black screen issues when swiped out Preview fragment and then swiped back in ViewPager2. Also fixed the issue when removeView(previewview) and then addView(previewView) . ( Iab555 , b/149877652 , b/147354615 )
  • Update the CameraView#takePicture() API to allow saving images to Uri and OutputStream . Update the test app to use Uri as the canonical example. ( Ia2459 , b/153607583 )
  • You can set PreviewView's scale type from a XML layout by setting the ScaleType attribute. ( I08565 , b/153015659 )
  • CameraView.ScaleType has been removed. Instead, use PreviewView.ScaleType to set/get a scale type with CameraView. ( Ia8974 , b/153014831 )
  • Give PreviewView a background color by default if it doesn't already have one. This prevents content behind it from being visible before the preview stream starts. ( I09fad )

Camera-Extensions Version 1.0.0-alpha10

15 آوریل 2020

androidx.camera:camera-extensions:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

Bug Fixes

  • Fixes to support the release of Camera-Core

Camera-View Version 1.0.0-alpha10

15 آوریل 2020

androidx.camera:camera-view:1.0.0-alpha010 is released. Version 1.0.0-alpha010 contains these commits.

Bug Fixes

  • Fixes a previous known issue where PreviewView 's surfaceView implementation wasn't working well on certain devices, and would cause the app to crash after resuming preview. ( I5ed6b )

Camera-Extensions Version 1.0.0-alpha09

1 آوریل 2020

androidx.camera:camera-extensions:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 , camera-core:1.0.0-beta02 , and camera-lifecycle:1.0.0-beta02 artifacts

Camera-View Version 1.0.0-alpha09

April 1, 2020 androidx.camera:camera-view:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

مسائل شناخته شده

  • Using ImplementationMode.SURFACE_VIEW with PreviewView may not work well on certain devices, this is because the SurfaceView used for preview invalidates its surface when the lifecycle of the window it's in is stopped, when it restarts, the camera is reopened and may attempt to resume preview before the SurfaceView 's surface is valid again. For now, you should use ImplementationMode.TEXTURE_VIEW .

API Changes

  • Renamed PreviewView.setImplementationMode() to PreviewView.setPreferredImplementationMode() .
  • Renamed PreviewView.getImplementationMode() to PreviewView.getPreferredImplementationMode() .
  • Replaced PreviewView.getSurfaceProvider() by PreviewView.createSurfaceProvider(CameraInfo) , which takes a nullable CameraInfo instance used to optimize preview by using ImplementationMode.SURFACE_VIEW whenever possible. If a null instance is passed, or if you set the preferred implementation mode to ImplementationMode.TEXTURE_VIEW , ImplementationMode.TEXTURE_VIEW is used internally.
  • The following code sample shows how a preview use case used to previously be used with PreviewView.

    preview.setSurfaceProvider(previewView.previewSurfaceProvider)
    cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    

    Right now, you can write the following:

    val camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    previewView.preferredImplementationMode = ImplementationMode.TEXTURE_VIEW
    preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.cameraInfo))
    
  • The @UiThread annotation has been added to PreviewView.getSurfaceProvider() , meaning it must be called from the main thread. ( I192f3 )

  • Added PreviewView.setScaleType() which allows to set the scale type of the preview. It accepts one of the values in PreviewView.ScaleType , and defaults to PreviewView.ScaleType.FILL_CENTER .

  • Added PreviewView.getScaleType() .

  • Removed support for setting the implementation mode for PreviewView in a XML layout using the implementationMode attribute.

  • Add createMeteringPointFactory() API to PreviewView to support converting (x, y) in PreviewView to MeteringPoint . ( Ib36d7 )

Bug Fixes

  • Fixed cases where an incorrect preview is displayed after PreviewView 's size changes. ( I71101 )

Camera-Extensions Version 1.0.0-alpha08

26 فوریه 2020

androidx.camera:camera-extensions:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Camera-View Version 1.0.0-alpha08

26 فوریه 2020

androidx.camera:camera-view:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Bug Fixes

  • Replaced the ListenableFuture on SurfaceRequest.provideSurface() with an Executor and Callback . This simplifies the API by no longer requiring handling of exceptions on provideSurface() and enforces that the provideSurface() callback cannot be cancelled. This is to prevent crashes on older devices caused by prematurely releasing surfaces. The SurfaceRequest.Result object is now used for tracking how a SurfaceRequest uses the provided Surface . ( I7854b )
  • Renamed SurfaceRequest.setSurface(Surface) to SurfaceRequest.provideSurface(Surface) and SurfaceRequest.setWillNotComplete() to SurfaceRequest.willNotProvideSurface() . ( I224fe )
  • Fixed initialization of app variants with ProGuard enabled by preserving the flag that sets the default CameraXConfig provider. ( I2d6c1 )

Camera-Extensions Version 1.0.0-alpha07

10 فوریه 2020

androidx.camera:camera-extensions:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .

Bug Fixes

  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )

Camera-View Version 1.0.0-alpha07

10 فوریه 2020

androidx.camera:camera-view:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .

API Changes

  • PreviewView 's TextureView implementation now sets the TextureView 's size to the camera sensor output size before scaling it to fill its parent PreviewView . If you want the camera preview to fill an entire part of the UI (the whole screen for instance), you should not set the PreviewView 's size to a fixed value, or have it wrap its content (by using the attribute " wrap_content " for example), this may result in the camera preview only filling part of the PreviewView (if the camera sensor output size is smaller). Instead, you should set the PreviewView as big as its parent (by using the attribute " match_parent " for example). ( 1204869 )

Bug Fixes

  • Updated ImageCapture to allow saving images to Uri and OutputStream . Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. ( Ia3bec )
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider . SurfaceProvider s no longer require developers to create their own ListenableFuture , and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView . ( I20105 )
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException , which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. ( I750d2 )
  • API updated, with getZoomRatio() , getMaxZoomRatio() , getMinZoomRatio() , and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. ( Ib19fe )

Camera-Extensions Version 1.0.0-alpha06

22 ژانویه 2020

androidx.camera:camera-extensions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-View Version 1.0.0-alpha06

22 ژانویه 2020

androidx.camera:camera-view:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

به روز رسانی ها

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Extensions Version 1.0.0-alpha05

18 دسامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

Bug Fixes

  • Updated to match the internal Camera Core APIs.

Camera-View Version 1.0.0-alpha05

18 دسامبر 2019

androidx.camera:camera-view:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

مسائل شناخته شده

  • The aspect ratio may be incorrect when using PreviewView ( b/146215202 ).

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

  • Implemented a new class called PreviewView.TextureViewImplementation that syncs the SurfaceTexture's lifecycle with the camera's usage of the TextureView's surface.

Camera-Extensions Version 1.0.0-alpha04

4 دسامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-extensions contains these commits

API changes

  • Checking for the availability and enabling of an extension now takes in a CameraSelector as an input parameter. This needs to be the same CameraSelector that is used for binding the use case.

    val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
    val builder = ImageCapture.Builder()
    val bokehImageCaptureExtender = BokehImageCaptureExtender.create(builder)
    if (bokehImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
        bokehImageCaptureExtender.enableExtension(cameraSelector)
    }
    val imageCapture = builder.build()
    mCameraProvider?.bindToLifecycle(this, cameraSelector, imageCapture)
    
  • You must initialize extensions before using the extension library.

    val availability = ExtensionsManager.init()
    Futures.addCallback<ExtensionsManager.ExtensionsAvailability>(
       availability,
       object : FutureCallback<ExtensionsManager.ExtensionsAvailability> {
           override fun onSuccess(availability: ExtensionsManager.ExtensionsAvailability?) {
               // Ready to make extensions calls
           }
           override fun onFailure(throwable: Throwable) {
               // Extensions could not be initialized
           }
       },
       Executors.newSingleThreadExecutor()
    )
    

Camera-View Version 1.0.0-alpha04

4 دسامبر 2019

androidx.camera:camera-view:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-view contains these commits

API changes

  • A PreviewView class is provided for easily displaying the output from the Preview use case in an application.
  • PreviewView can be included in the layout:

    <androidx.camera.view.PreviewView
      android:id="@+id/preview_view"
       />
    
  • PreviewView provides a PreviewSurfaceProvider to easily connect a Preview use case

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • ZoomLevel ” is now “ ZoomRatio ” in API-naming

  • Some method parameters have changed nullability

Camera-Extensions and Camera-View Version 1.0.0-alpha03

9 اکتبر 2019

androidx.camera:camera-extensions:1.0.0-alpha03 and androidx.camera:camera-view:1.0.0-alpha03 are released. These are the commits included in camera-extensions:1.0.0-alpha03 and these are the commits included in camera-view:1.0.0-alpha03 .

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

  • Added Context initializer for extensions. Extensions version incremented to 1.1.0

Camera-Extensions and Camera-View Version 1.0.0-alpha02

5 سپتامبر 2019

androidx.camera:camera-extensions:1.0.0-alpha02 and androidx.camera:camera-view:1.0.0-alpha02 are released. These are the commits included in camera-extensions:1.0.0-alpha02 and these are the commits included camera-view:1.0.0-alpha02 .

  • Added tests to verify PreviewImageProcessorImpl has correctly implemented timestamps.
  • Fix ExtensionTest test failure on Nexus 5 (API level 21) and ensure preview is available.

Camera-Extensions and Camera-View Version 1.0.0-alpha01

7 آگوست 2019

androidx.camera:camera-extensions:1.0.0-alpha01 and androidx.camera:camera-view:1.0.0-alpha01 are released. These are the commits included in camera-extensions:1.0.0-alpha01 and these are the commits included camera-view:1.0.0-alpha01

  • New library for future Camera Extensions for accessing effects on supported devices. This library is a work in progress.
  • New Camera View class. This library is a work in progress.