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

Galaxy phones could get Google Wallet quick settings toggle

Galaxy phones could get Google Wallet quick settings toggle

Google’s Pixel smartphones and tablets offer a Quick Setting toggle for Google Wallet if the app for the digital wallet service is installed on those devices, allowing users to quickly open it and access ID cards or make payments. However, Samsung’s Galaxy smartphones and tablets don’t offer that nifty feature even with its app installed. […]

  • By Abid Iqbal Shaik
  • 3 days ago
Google Gemini can now do more without Assistant’s help

Google Gemini can now do more without Assistant’s help

Google Gemini can perform many tasks that the company’s Assistant can’t, such as directly giving answers to your questions rather than showing results for it on the web, writing content, coding, generating images, and much more. However, Gemini lacks many features that Assistant has. One of them is the capability to set an alarm or […]

  • By Abid Iqbal Shaik
  • 3 days ago
You can soon reply to emails from Galaxy Z Flip 5, Flip 6 cover display

You can soon reply to emails from Galaxy Z Flip 5, Flip 6 cover display

Samsung introduced a much bigger cover screen to its Galaxy Z Flip lineup last year with the Galaxy Z Flip 5. This year, the company is making sure that the big screen is put to good use. No, it still isn't allowing all apps to be run on the cover screen, but it is working […]

  • By Asif Iqbal Shaik
  • 4 days ago
Google optimizes more apps for Galaxy Z Fold 6

Google optimizes more apps for Galaxy Z Fold 6

Earlier today, Samsung unveiled seven new products featuring Galaxy AI. Those include the Galaxy Z Flip 6 and the Galaxy Z Fold 6 with One UI 6.1.1 and Galaxy AI improvements. Google has now announced that it has done more optimizations for some of its apps to work better on Samsung's new foldables. Galaxy Z […]

  • By Asif Iqbal Shaik
  • 5 days ago
Samsung confirms its XR headset is coming this year!

Samsung confirms its XR headset is coming this year!

At today's Galaxy Unpacked event in Paris, Samsung unveiled seven new devices, all featuring Galaxy AI. After announcing the features and pricing of all those devices, the company unveiled the Samsung XR headset launch time frame, and it is coming this year! Samsung XR headset launch to happen by the end of 2024 Earlier this […]

  • By Asif Iqbal Shaik
  • 5 days ago
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
  • 6 days ago