Developer Preview – Devstyler.io https://devstyler.io News for developers from tech to lifestyle Fri, 29 Oct 2021 07:56:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 Android Dev Summit focuses on building apps across devices https://devstyler.io/blog/2021/10/29/android-dev-summit-focuses-on-building-apps-across-devices/ Fri, 29 Oct 2021 07:56:58 +0000 https://devstyler.io/?p=73963 ...]]> Google LLC’s Android Dev Summit 2021 happened two days ago and was all about enabling developers to build better apps across devices.

To begin, the Android team is expanding its collection of development tools by bringing Material You to Jetpack Compose. And Jetpack itself is getting jam-packed with new features that developers have been clamouring for.

A new operating system optimization feature for Android 12 called 12L that’s designed specifically for large screens was also announced to make it work better for tablets, Chromebooks and foldable. Smaller form factors also got some love with Wear OS updates in Jetpack Compose.

Here comes Material You to Jetpack Compose

Material You is a set of design updates that launched with Android 12 that delivers an adaptive user interface on Android devices. The Android team has now brought its capabilities into Jetpack Compose, a developer toolkit for building native UIs.

With this integration, developers will be able to access Material You’s personalization features with the first alpha build of Compose Material 3, which offers Material Design 3 components and themes. The new Material Theme builder is available as a Figma plugin and a web tool.

Android team is releasing the first beta version of Jetpack Compose 1.1 with features such as stretch over scroll for Android 12, improved touch-target sizing, experimental lazy layout animations and more which aims to allow developers to design for more screen sizes and form factors.

On the other hand, Jetpack is getting more features developers have been asking for

For instance, Navigation has added multiple back stacks support. WorkManager, the recommended solution for persistent work, which makes it easier to handle Android 12 background processes, added support for expedited jobs. Room adds auto-migration and multimap relations. DataStore, the replacement for SharedPreferences, reaches version 1.0. And Macro Benchmark, a tool to measure and improve startup, adds simplified frame timing and compatibility.

According to Google, there are a lot of large-screen devices running on Android and as a result, the Android team is looking to increase support for those devices with “12L.”

12L is a special feature drop for Android 12 that optimizes for these large screens and provides a new set of tools to make multitasking more powerful and intuitive compatibility support for apps.

The refinements include UI changes that allow large screens above 600dp, to take advantage of a new two-column layout. This includes the notification shade, lock screen and other system surfaces. In 12L there is also a new taskbar that lets users instantly switch between apps on the fly. It makes split-screen mode more accessible than ever.

Google plans to launch 12L early next year in step with the next wave of Android 12 tablets and foldable.

Wear OS gets Jetpack Compose support

What is more, the Android team is bringing Compose support to Wear OS with a developer preview. It includes new samples and documentation that will help developers get started.

Tiles API is currently in beta, which provides predictable and glanceable access to information and quick actions on the watch face. And Android has partnered with Samsung to make it easier to design watch faces. The Watch Face Studio enables developers to create watch faces rapidly without any coding knowledge.

]]>
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.

]]>