Reserve the next Galaxy and get $50 instant Samsung Credit!

SamMobile has affiliate and sponsored partnerships. If you buy something through one of these links, we may earn a commission.

News For You
News For You
Notifications

Google is encouraging developers to make better-behaving apps for foldables

Phone
By 

Last updated: November 22nd, 2022 at 07:14 UTC+01:00

Most smartphone buyers buy a phone to take advantage of these phones' great camera capabilities. For example, the Galaxy S22 Ultra saw a huge demand among smartphone buyers because of its exceptional camera performance. And cameras are going to be one of the top reasons for a consumer to purchase a phone.

App developers, in order to use the camera capabilities in their apps, adopt Android's Camera Framework. The first use case of the framework is to implement the camera preview to be displayed in the app. But as ambitious foldable devices like Samsung's Galaxy Z Fold 4 are becoming increasingly popular, the camera preview screen may become stretched, upside-down, or incorrectly rotated. Often these make the app crash if used in a multi-window environment.

To fix all this, Google is setting some new guidelines with the new CameraViewfinder that will take care of all those details and provide a streamlined camera experience. As noted in the official blog, “CameraViewfinder is a new artifact from the Jetpack library that allows you to quickly implement camera previews with minimal effort.

This CameraViewfinder employs either a TextureView or a SurfaceView, allowing the camera feed to adjust in accordance with the transformations. The transformations include the correct aspect ratio, scale, and rotation. Moreover, it is fully compatible with the Camera2 codebase.

For a complete step-by-step process to use the CameraViewfinder, you can visit here. The CameraViewfinder function is now ready to use across foldable phones, configuration changes, rotations, and multi-window modes. In fact, as noted in the blog, it has been tried and tested on many foldable devices.

Phone Google
Galaxy AI summarized

Scroll for more related content
News For You

You might also like

Control favorite smart home devices more easily from your Galaxy Watch

Control favorite smart home devices more easily from your Galaxy Watch

You can now control smart home devices more easily from your Wear OS-based Galaxy Watch. Google announced this feature last month at the Google I/O 2024 event, and it is now available on Samsung's recent and upcoming Galaxy Watches. Use Google Home's complication and tile to control smart home devices easily The Google Home app […]

  • By Asif Iqbal Shaik
  • 22 hours ago
Chrome can soon read webpages for you even in background

Chrome can soon read webpages for you even in background

Chrome for Android has an option called ‘Listen to this page,’ which can read content on a webpage aloud, which is very helpful if you don’t want to go through the hassle of reading it and just listen to the content like a podcast. Listening to content instead of reading it also frees you up […]

  • By Abid Iqbal Shaik
  • 6 days ago
Google Keep can now show notes from two different accounts side by side

Google Keep can now show notes from two different accounts side by side

Last year, Google updated the Keep app for Android to let you open two instances of the app in a split-window setup on large-screen devices, such as Galaxy Tab, which allows you to access two different notes side-by-side. Now, the company is improving that functionality by letting you access two different accounts in two different […]

  • By Abid Iqbal Shaik
  • 6 days ago
Google AI is coming soon to compete with Galaxy AI

Google AI is coming soon to compete with Galaxy AI

Samsung was the first smartphone brand to launch a comprehensive suite of AI features called Galaxy AI. It debuted earlier this year on the Galaxy S24 and made it to some older high-end Galaxy phones a few months later. Now, Google is bringing its Galaxy AI rival. Google AI could debut on Pixel 9, ready to take on Galaxy AI […]

  • By Abid Iqbal Shaik
  • 7 days ago
Google is bringing Samsung’s new Quick Share into its Files app

Google is bringing Samsung’s new Quick Share into its Files app

Earlier this year, Google merged its Nearby Share file-sharing system with Samsung’s Quick Share system. It then released the new Quick Share feature to all Android phones and tablets. Now, it is preparing to integrate that into its file manager app. New Quick Share is coming to Google’s Files app Google’s Files app is pretty popular […]

  • By Abid Iqbal Shaik
  • 7 days ago
Pixel phones will no longer use processors made by Samsung

Pixel phones will no longer use processors made by Samsung

Since the launch of the first Pixel phone with a Tensor chip, Google has always got its chip fabricated by Samsung Foundry. However, that will change next year, as Google wants to switch to TSMC for more reliable quality and yield. Information about the Pixel 10 processor has now been revealed. Pixel 10 processor, 3nm […]

  • By Asif Iqbal Shaik
  • 1 week ago