Post has attachment
The second post in the ViewModel series is out!

Learn more here: goo.gl/WwuEH8

In part one, we looked at a simple example with the new ViewModel Architecture Component. This time, we're taking a look at how ViewModels relate to local persistence, onSaveInstanceState() and Loaders. There's also an explanation of saving and reloading complex UI state efficiently with a ViewModel.

There's more to come, so let us know your ViewModel and android architecture related questions!

Post has attachment
What's up with the new Architecture Component ViewModel? Find out in the first of a series of blog posts about ViewModels. The post this week is an introduction to ViewModels and the ViewModel lifecycle with a simple practical example: https://goo.gl/UNe9fg

There'll be deeper ViewModel dives to come, so let us know your ViewModel and Architecture Component related questions!

Post has attachment
Lessons learned while converting to Kotlin with Android Studio

Just converted your app to Kotlin? Here are some tips to improve your code!

Read the blog post here: https://goo.gl/b61nmJ

Post has shared content
Here's a great example of how to use AnimatedVectorDrawable's to delight your users by +Nick Butcher
I recently saw a question on /r/androiddev asking how to implement a fancy animation… and decided to demonstrate how to do it using AnimatedVectorDrawable.

Here's a breakdown of how I did it: https://medium.com/@crafty/animation-jump-through-861f4f5b3de4

Or you can jump straight to the code here: https://gist.github.com/nickbutcher/97143b3240682e5c5851fe45b49fde93

#AndroidDev #AndroidDesign #Animation
Animated Photo

Post has attachment
Background Optimizations in Android 7.0 Nougat

Android 7.0 Nougat contains a number of optimizations around background processing, intending to limit the amount of memory thrashing caused when many apps listen for the same implicit broadcast via manifest registered receivers, leading to poor overall system performance when the device is switching networks or when a picture or video was just captured.

When targeting API 24, you’ll no longer receive CONNECTIVITY_CHANGE broadcasts to manifest registered receivers (although runtime receivers will continue to work as your process is already in memory) - consider using JobScheduler to listen for network change events.

For all apps, regardless of whether they target API 24 or not, you’ll no longer be able to send or receive NEW_PICTURE or NEW_VIDEO broadcasts, usually sent immediately after taking a new picture or new video, respectively. Instead, use JobScheduler’s new ability to trigger based on content URI changes to kick off your job.

Check out the documentation for all of the details: https://goo.gl/k6gn4S
And learn all about JobScheduler in our previous video: https://youtu.be/XFN3MrnNhZA?list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM&index=12

#BuildBetterApps

https://youtu.be/vBjTXKpaFj8?list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM&index=14

Post has attachment
Quick Settings Tiles

While quick settings tiles such as WiFi, Bluetooth, and Airplane mode have been around for some time, Android 7.0 adds the ability for any app to provide their own quick settings tile, giving users quick access to the most important and frequent actions from your app.

Watch the video to learn about the lifecycle of your TileService, how to update your tile, and how to handle clicks, then read the blog post for all the details and a full rundown of the quick settings tile API: https://medium.com/google-developers/quick-settings-tiles-e3c22daf93a8

#AndroidNougat #BuildBetterApps

https://www.youtube.com/watch?v=xwvU6Pj3ATQ&list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM&index=13

Post has attachment
Scheduling jobs like a pro with JobScheduler

One of the most important things with respect to background work is being as efficient and low impact as possible. JobScheduler works across the system to batch jobs together--meaning reduced battery drain, reduced memory pressure on API 24+ devices, and built-in awareness of Doze and App Standby.

Read the blog post for all the details and code examples: https://medium.com/@dontmesswithjo/scheduling-jobs-like-a-pro-with-jobscheduler-286ef8510129

https://www.youtube.com/watch?v=XFN3MrnNhZA&index=36&list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM

#BuildBetterApps

Post has attachment
Virtual Files, Alternative Mime Types, and the Storage Access Framework

New in #AndroidNougat, apps using the Storage Access Framework can now provide virtual files - files without a direct bytestream representation. While you can’t use openInputStream() with these virtual files, you can use Android 7.0’s alternative mime types to potentially transcode the files into alternative file formats or simply use them with an ACTION_VIEW Intent to open them in their native editor.

Check out the documentation on virtual files at https://developer.android.com/about/versions/nougat/android-7.0.html#virtual_files and read more about the Storage Access Framework at https://developer.android.com/guide/topics/providers/document-provider.html

#BuildBetterApps.

Post has attachment
Building a DocumentsProvider

Android 4.4 KitKat introduced the Storage Access Framework, a common framework which allows apps use a system provided UI to request files from apps and from local storage. Your app can be an equal partner on that list by implementing a DocumentsProvider, making files your app owns available to other apps, all without needing the Storage permission or requiring you build your own file selection UI.

Watch the video to go through the required APIs needed for building a DocumentsProvider, then read the novel blog post for more details and all of the other functionality that you can add to a DocumentsProvider: https://medium.com/google-developers/building-a-documentsprovider-f7f2fb38e86a

See this video and many others in the full Android Development Patterns playlist: https://www.youtube.com/watch?v=LaMUvV-gOfE&list=PLWz5rJ2EKKc-lJo_RGGXL2Psr8vVCTWjM&index=10

#BuildBetterApps

Post has attachment
Media Playback Apps and the Support Library

When it comes to building a media playback app, the last thing you want to worry about is Android API level. With the restructure of the v4 Support Library and the introduction of the Media-Compat Support Library, knowing exactly what media APIs are available in what Support Library can save you time and effort as you #BuildBetterApps

https://medium.com/google-developers/meida-playback-and-the-must-have-android-support-library-apis-9f48dc6b657e
Wait while more posts are being loaded