Techno Blender
Digitally Yours.

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

0 31


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.


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.

FOLLOW US ON GOOGLE NEWS

Read original article here

Denial of responsibility! Techno Blender is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – [email protected]. The content will be deleted within 24 hours.

Leave a comment