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

Samsung could soon allow you to summon Gemini with power button

Samsung could soon allow you to summon Gemini with power button

Do you remember when Samsung used to have a dedicated button on its phones to summon Bixby? It was introduced with the Galaxy S8, but the company removed it, starting with the Galaxy S20. Now, you can summon Bixby using the power button. Samsung doesn't let you use any other AI assistant with the power […]

  • By Asif Iqbal Shaik
  • 1 day ago
Gemini brings new actions and features to Galaxy phones

Gemini brings new actions and features to Galaxy phones

Google has replaced Google Assistant with Gemini on most new Android phones. When Gemini was new, it had much better language interpretation than Google Assistant, but the latter had more features and integration with more services. Now, Gemini is getting those features and integrations. Gemini is getting Utilities extension for more on-device actions Google has […]

  • By Asif Iqbal Shaik
  • 2 days ago
Switching from iPhone to Galaxy is about to get easier

Switching from iPhone to Galaxy is about to get easier

One of the biggest problems in switching between different smartphone platforms is the transfer of personal data. Although Apple and Google have improved data transfer from their own platforms to other platforms, it is still not completely seamless. Google is making things better by bringing support for transferring Live Photos from iPhones to Android devices. […]

  • By Asif Iqbal Shaik
  • 3 days ago
Google is making switching to new Galaxy phone even easier

Google is making switching to new Galaxy phone even easier

Google is improving Android with each new release. One issue that has always plagued Android phones is that you need to log into each app manually when you switch from one phone to another. Thankfully, that problem will soon go away. When you switch to new Galaxy phone, apps will be logged in automatically Google […]

  • By Asif Iqbal Shaik
  • 2 weeks ago
Google Messages is getting in-app backup and restore feature

Google Messages is getting in-app backup and restore feature

Google Messages has now become the default messaging app on many Galaxy phones and tablets. Samsung made it the default app to help improve RCS adoption worldwide. Now, Google Messages is getting a backup and restore feature to keep your chats secure. Google Messages could get backup and restore feature The latest beta version (20241118_02_RC00) […]

  • By Asif Iqbal Shaik
  • 2 weeks ago
Google is working on a toolbox UI for Circle to Search

Google is working on a toolbox UI for Circle to Search

Although the functionality of Circle to Search hasn't changed much since it debuted on the Galaxy S24 family of phones, Google seems undecided about its UI design. A teardown of a Google app version in development shows that the company is again redrawing the UI of Circle to Search. These recent findings in the Google […]

  • By Mihai Matei
  • 2 weeks ago