Samsung Cyber Monday deals at Amazon | Awesome Cyber Monday deals at Samsung, claim your next Galaxy now!

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

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


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
Load 1 comments

You might also like

Google Messages will soon let you react to messages with any emoji

Emojis are a fun way to react to someone’s message without typing those sentences. You can send a thumbs-up to appreciate something or send an open-mouth emoji to react to something shocking. As of now, Google Messages allows you to only use seven emojis: thumbs up/down, smiling face with heart-eyes, face with tears of joy, […]

  • By Sagar Naresh
  • 4 days ago

Google Search app gets tablet optimizations on Galaxy tablets

We recently reported how Google is making its continued efforts to bring better support for big-screen devices such as┬átablets and foldable phones. It added drag-and-drop improvements and full mouse support to a bunch of Google Workspace apps. Now, Google has added improved tablet support to the Google Search app. The latest Google app beta version […]

  • By Sagar Naresh
  • 5 days ago

[Video] Galaxy S22 vs Pixel 7 ultimate camera comparison: Who won?

The Galaxy S22 offers one of the best mobile cameras within its price range, but smartphone users have also praised Google’s Pixel smartphones for their powerful camera AI systems. So, which one is better at mobile photography? The Galaxy S22 or the new Google Pixel 7? We try to answer this question in our new, […]

  • By Mihai Matei
  • 5 days ago

More Google apps get improvements on tablets and foldables

Google is making an all-around effort to better support big-screen devices such as tablets and foldable phones. In line with this, Google is updating a bunch of its Workspace apps and adding drag-and-drop improvements and full mouse support. This could also be because the company is reportedly working on a Google Pixel tablet, which is […]

  • By Sagar Naresh
  • 6 days ago

Samsung’s dominance makes Pixel Fold a waste of Google’s time

Much has been written about Google’s foldable ambitions. The company has become a bit serious about its hardware in recent years. It’s trying to punch above its weight with the new Pixel smartphone in addition to the new wireless earbuds and smartwatch. We might ostensibly see a Pixel Fold from Google down the road. Plenty […]

  • By Adnan Farooqui
  • 6 days ago

Google’s Nearby Share to get Material You makeover on your Galaxy device

Similar to Samsung’s Quick Share, Google’s Nearby Share feature allows you to send files between two Android devices. It creates a peer-to-peer Wi-Fi network using Bluetooth pairing to facilitate file transfer between them, and it even works offline. While the feature is nice, the Material You makeover is all set to arrive for Nearby Share […]

  • By Sagar Naresh
  • 7 days ago