Apps that make use of your phone’s camera should soon be quicker and more stable. Google has released a tool for developers called CameraX that will help them tweak how their apps make use of phone cameras.
It’s in the early stages of development, but Google believes CameraX will solve compatibility issues, which means apps will work consistently across a wider range of devices. More importantly, it will help advanced features reach more phones.
Set to infinity
Developers face a staggering amount of diversity when coding their apps. Dozens of phone makers release hundreds of phones each year with who-knows-how-many variants of Android on board. Developers who create apps that tap into device cameras also have to contend with an incredible array of under-the-lens components, such as sensors and IPUs, not to mention unique algorithms. Enter CameraX.
According to Google, CameraX will make it easier for developers to write camera apps. It is a new API that works across nearly all Android devices back to Android 5.0 Lollipop. It should resolve device compatibility issues and negate the need for developers to rely on device-specific code in their app. That’s hugely freeing.
Two lines of code instantly let third-party apps interface with the stock camera app on every phone in the market. This significantly lowers the time it takes to write their own app. Further, it lets developers include advanced features such as beauty, portrait, HDR, and night mode. Imagine opening Instagram and having access to your phone’s native HDR feature when shooting those scintillating selfies.
Dial it in
CameraX lets developers drop plug-and-play modules into their apps to cover basic camera behaviors. These include previewing images on the display, analyzing images through Machine Learning, and capturing full-resolution photos. It accounts for aspect ratios, orientation, preview size, and various resolutions.
Since CameraX handless these central tasks, developers are free to focus on performance and other features. Google says it plans an ongoing array of updates for CameraX. A new camera lab will handle testing against different cameras, operating systems, API levels, and performance so compatibility will always remain up to date.
Google hopes developers test CameraX, which is in alpha status, so it can bring the functionality to Android Studio sooner rather than later.
The final result of this effort should lead to better camera performance within third-party apps, which is good news for everyone.