Pixel 4 – Devstyler.io https://devstyler.io News for developers from tech to lifestyle Thu, 15 Jul 2021 13:37:30 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 New Features of Android 12 https://devstyler.io/blog/2021/07/15/new-features-of-android-12/ Thu, 15 Jul 2021 13:37:30 +0000 https://devstyler.io/?p=59419 ...]]> Android 12 is Google’s biggest OS release in years. That Google has managed to sneak in even more features before the stable release is impressive, though to be fair, it’s no secret that they’ve been working on the features announced today.

So what exactly did Google add to Android 12 Beta 3? According to the official blog post, notable new features in Beta 3 include a faster display auto-rotation and scrollable screenshots.

With scrolling screenshots in Android 12, you can capture a screenshot of content that’s scrollable. This means you won’t have to capture screenshots one-by-one and then stitch them together manually. Google has been working on this feature since last year’s Android 11 developer preview, but it didn’t make the cut for that release since the team had limited resources (due to COVID-19) and wanted to implement it the right way. However, Google quietly resumed development on the feature, and we caught a glimpse of it in the first Android 12 developer preview. The scrolling screenshots implementation was hidden from subsequent developer previews and beta releases, but we saw a near-final version of the feature a few months ago thanks to a leaked internal build.

As we suspected, the way scrolling screenshots work in Android 12 is based on Views rather than the image stitching found in OEM implementations. When users capture a screenshot of content that’s scrollable, a new “capture more” button is shown that, when tapped, extends the screenshot to show the whole screen that the user can then adjust to crop.

Google says that scrolling screenshots will work out-of-the-box for most apps, provided the app uses a standard View-based UI. If an app or UI toolkit doesn’t use a View-based UI or uses a heavily customized UI, then it’ll need to implement the new ScrollCapture API to tell the system how to capture the screen. Google is working on making its scrolling screenshots implementation work in more cases, such as for scrolling ListViews (coming in Beta 4) and WebViews. Support for the latter may be coming natively to Google Chrome, but it’ll be nice to see a generic implementation that’ll work in any app that uses a WebView.

Better, faster autorotate

Android 12 is finally improving upon one of the most basic features of the OS: autorotation. Starting in Beta 3, Android’s auto-rotate feature has been enhanced with face detection, which uses the front-facing camera to more accurately detect when the screen should be rotated. This should hopefully lead to fewer unintended screen rotations when you’re lying down on a couch or in bed. Images captured by Android’s enhanced autorotation feature are processed on-device within Android 12’s Private Compute Core, so they never leave the device.

Google says that this face-based autorotation feature is available in Beta 3 on the Pixel 4 and later Pixel devices, but all devices running Android 12 can take advantage of the other improvements made to screen rotation. These improvements include optimizations to the animation and redrawing of the screen as well as an added ML-driven gesture detection algorithm, reducing the latency of the base auto-rotate feature by 25%.

Face-based autorotate was one of the earliest features rumored to be coming to Android 12, and we confirmed its existence in early developer preview builds. Based on our analysis, it seems that Google’s face-based autorotation feature is handled by the Device Personalization Services app, so it may be possible to enable it on other Pixel devices.

]]>
Googler drops hint that the Pixel 6 will have custom chip code-named “Whitechapel” https://devstyler.io/blog/2021/05/06/googler-drops-hint-that-the-pixel-6-will-have-custom-chip-code-named-whitechapel/ Thu, 06 May 2021 11:57:03 +0000 https://devstyler.io/?p=50075 ...]]> Earlier this month, a report alleged that Google will ship its in-house silicon in 2021 Pixel devices. Now, a Googler has left a comment online that provides the first public evidence we can point to that the upcoming Pixel 6 will be powered by the rumored Google-made chip.

In a code change submitted to the Android Open Source Project (AOSP), a team of Googlers are attempting to update the SELinux policy of the OsloFeedback app, the app responsible for Soli radar gestures on the Pixel 4. The code change itself isn’t interesting to most users, but down in the comments, a Googler responded with a link that leads to Google’s internal source code repo (H/T XDA Member cstark27). The Googler likely isn’t referring to the Pixel 5a here since an earlier report suggests the device will be powered by the same chip as the Pixel 4a 5G/5. 

Whitechapel” is the rumored code-name assigned to the chip that Google is reportedly designing in conjunction with Samsung. “GS101” likely refers to the first chip in the custom “Google Silicon” line, as previously reported by 9to5Google earlier this month and corroborated by us.

This isn’t the first time that Google has let slip a key detail of its upcoming Pixel devices on AOSP. Before the Pixel 4’s launch, we spotted a comment in Android 10’s source code that essentially confirmed the 2019 Pixels would have 90Hz displays. Today’s leak doesn’t reveal any actual details about the Google Silicon chip, but it’s the first piece of public evidence that ties the 2021 Pixels to GS101 and whitechapel.

]]>
Android 12’s Third Developer Beta Helps Apps Get More From Cameras and Haptic Hardware https://devstyler.io/blog/2021/04/22/android-12-s-third-developer-beta-helps-apps-get-more-from-cameras-and-haptic-hardware/ Thu, 22 Apr 2021 09:43:32 +0000 https://devstyler.io/?p=48675 ...]]> Today we will share a Developer Preview of the next milestone release of Android 12.

In the following release, we will comment on the new app launch, the new video and camera capabilities, the new permission for exact alarms, and more. Here are the updates that we’ve listed.

  • Improved app launch experience

In Android 12 there is a new app launch animation for all apps from the point of launch, a splash screen showing the app icon, and a transition to the app itself. The new experience brings standard design elements to every app launch, which will be customizable so apps can maintain their branding.

  • New call notification template 

Incoming and outgoing calls are important to users and they need to be easy to see and manage. In Android 12 all call notifications are improved so that you can give them more visibility and scannability, and improve their consistency with other notification components. If your app handles calls – such as a dialer app or chats app with video calling – you’ll want to try the new CallStyle template.

  • New permission for exact alarms 

Alarms are an important way for apps to schedule work. In most cases, apps should use inexact alarms. Android manages these alarms to minimize wakeups and battery impacts, such as through Doze and App Standby. For cases where you need alarms with precise timing – for example, alarm clocks and timers you can use exact alarms instead. Apps targeting Android 12 that want to use exact alarms will now need to request new permission, SCHEDULE_EXACT_ALARM. There is also users visibility over the apps that have this permission and letting them a grant and revoke it from Special App Access Permissions in Settings.

  • Better web linking 

Android changed the default handling of links that aren’t verified through Android App Links or manually approved for links by the user. Now the OS will directly open them in the default browser, rather than showing a chooser dialogue. If you want to ensure that only your app can handle links from your domain, you can use App Links. There are also new ADB commands to help you configure and test your links.

  • Rich haptic experiences 

There is now informative haptic feedback for UI events, immersive and delightful effects for gaming, and attentional haptics for productivity. It will include expressive effects like a low tick that take advantage of the broader frequency bandwidth of the latest actuators. Game developers can now access multiple, different actuators independently in-game controllers to deliver the same effect synchronously or different haptic effects on multiple actuators. You can try these APIs to the fullest on Pixel 4 devices now.

Video encoding improvements 

Android 12 standardizes the set of keys for controlling the range of the video Quantization Parameters (QP), allowing developers to avoid vendor-specific code. The new keys are available in the media format API and also in the NDK Media library. Video encoders must specify a minimum video quality threshold to ensure that users don’t experience extremely low quality when videos are complex.

  • Camera2 vendor extensions 

Many of our device manufacturer partners have built custom camera effects—such as bokeh, HDR, night mode, and others—that they want apps to use to create differentiated experiences on their devices. The extension APIs expose exactly the same set of effects as in Camera X, and those are already supported on many different devices, so you can use them right out of the box.

  • Quad Bayer camera sensor support 

Many Android devices today ship with ultra-high-resolution camera sensors, typically with Quad / Nona Bayer patterns, and these offer great flexibility in terms of image quality and low-light performance. In Android 12, there is a new platform APIs that let third-party apps take full advantage of these versatile sensors. The new APIs support the unique behaviour of these sensors and take into account that they might support different stream configurations and combinations when operating in full resolution or ‘maximum resolution’ mode vs ‘default’ mode.

Photo Credits: 9To5Google

  • Faster machine learning

Android 12 highlighted the key areas so that developers can make the most of ML accelerators and always get the best possible performance through the Neural Networks API. In terms of performance improvements – there are more than halved inference call overhead by introducing improvements such as padding, sync fences and reusable execution objects. ML accelerator drivers are updatable outside of platform releases, through Google Play services. This will make it easier for developers to take advantage of the latest drivers on any compatible device.

  • Standardizing GPU compute 

Android is deprecating the RenderScript APIs in favour of cross-platform GPU compute solutions such as Vulkan and OpenGL. Now you can have confidence that your high-performance workloads will run on GPU hardware, and many devices are already shipping with only CPU support for RenderScript. The existing APIs will continue to work for the time being. Android has open-sourced a library for RenderScript intrinsics such as blur that uses the highly-optimized intrinsics platform code.

  • Better debugging for native crashes 

Android 12 will give us more actionable diagnostics because there will be crash dump files called tombstones to debug our native crashes, and they contain the information required to diagnose a variety of issues. This includes unwinding through ART, integrating with fdsan, and recording all the stacks involved in a GWP-ASan, HWASan, or MTE crash. Now we’re giving your app access to its tombstone files through the App Exit Reasons API. When your app uses `ApplicationExitInfo` with `REASON_CRASH_NATIVE`, you can now call `getTraceInputStream()` to get the tombstone data as a protocol buffer.

  • More flexible backup configurations

Android’s backup service lets users restore or migrate their data to a new device effortlessly. Apps are central to the experience, enabling users to easily transfer app data and continue where they left off. The backup service supports both cloud backups to Google Drive and device-to-device transfers, and developers can take advantage of these with minimal changes in their apps.

App compatibility

In Android 12, most app-facing changes opt-in are made to give you more time, including updated tools and processes to help everyone get ready sooner.

Now is the time to try these new features. For complete information, visit the Android 12 developer site.

]]>