Fresh news from Droid zone
Hello, you're reading Infinum Android Sweets, bringing you the latest Android related news straight to your inbox every week.
Android Styling: Themes Overlay
Today we’ll focus on actually using themes, how they are applied to your app and the implications for how you build them.
Read More
he Lifecycle 2.2.0 update including simplified initialization with by viewModels() and by activityViewModels() syntax for the ViewModel (VM) component is great for quickly creating VMs. What about re-using the VM instance throughout the Fragment, passing arguments/parameters into the VM while also enabling saved state?
The Camera2 API is powerful but it can be tricky to get the most out of it, especially due to the variety of camera capabilities offered by different devices such as HDR or night modes. To address this, at last year’s Google I/O, we announced CameraX a new Jetpack library designed to take the frustration out of adding camera features to apps.
Have you ever tried to encrypt data in your app? As a developer, you want to keep data safe, and in the hands of the party intended to use. But if you’re like most Android developers, you don’t have a dedicated security team to help encrypt your app’s data properly.
AndroidX libraries can release once every two weeks. All development is done in the open, and you can follow along changes to the androidx-master-dev branch using Android Code Search. The 2 week release cycle can sometimes get in your way and to account for this we recently made snapshot builds available to developers.
Many apps face a similar challenge. Where do we put common logic for all of our screens? A base class is often the solution, but it can become a nasty beast. Let’s have a look for better options.
Libraries and useful resources
Shimo is an adapter for Moshi which randomizes the order of keys when serializing and deserializing.
A time-traveling bytecode rewriter which adds future APIs to android.jar.
In this episode, Donn and KG talk about the post Tim Bray recently wrote – Why Google did Android. They then touch on Chrome becoming a monopoly and tips on what folks can do to be a little more privacy conscious on the web.
Class of the week
A RemoteInput object specifies input to be collected from a user to be passed along with an intent inside a PendingIntent that is sent. Always use RemoteInput.Builder to create instances of this class.
Beyond Android
To provide users with a good service, government organisations usually need to collect data. Lots of data. The GOV.UK Design System team creates patterns and components that let users enter their data in an easy and accessible way. The last thing we want to do is create barriers to users completing a task and force them to find an alternative method of using the service, such as phoning a helpline.