Postingan

Menampilkan postingan dengan label Jetpack

Android Auto Apps Powered by Jetpack

Gambar
Posted by Eric Bahna, Product Manager In January, we enabled the Google Play Store to accept open testing submissions of navigation, parking, and charging apps. It’s great to see many of you developing Android Auto apps and sending us feedback through the issue tracker. Thank you for helping us improve the platform so we deliver better in-car experiences together! Drivers have been sending positive feedback, too, as new apps launch to open testing, like Chargemap. Chargemap in Android Auto Today, we’ve reached the next milestone: the Android for Cars App Library is available in Jetpack as androidx.car.app 1.0.0-beta01 ! The move to Jetpack makes the library open source, gives you more visibility into our feature development, and provides API consistency with other Jetpack libraries. We’ve updated the developer guide and design guidelines to cover androidx.car.app . Test your app with Android Auto 6.1, or later, then you can publish your app to open testing in the Google Play St...

Announcing Jetpack Compose Beta!

Gambar
Posted by Anna-Chiara Bellini , Product Manager, Nick Butcher , Developer Relations Today, we’re launching the beta release of Jetpack Compose , our new UI toolkit designed to make it faster and easier to build native apps across all Android platforms. Compose offers modern, declarative Kotlin APIs, helping you build beautiful, responsive apps with way less code. Built to integrate with existing Android apps and Jetpack libraries, you can adopt Compose at your own pace by combining Android Views and Compose. With this beta release, Compose is API complete and has all the features you need to build production-ready apps. Beta also means API stable, so we won’t change or remove APIs. Now is a great time to start learning Compose and begin planning for how you will use it in an upcoming project or feature once it reaches 1.0 later this year. What's In Beta Our team has been developing Compose in the open with feedback and participation from the community. Since open sourcing deve...

MAD Skills Kotlin and Jetpack: wrap-up

Gambar
We just wrapped up another series of MAD Skills videos and articles - this time on Kotlin and Jetpack. We covered different ways in which we made Android code more expressive and concise, safer, and easy to run asynchronous code with Kotlin. Check out the episodes below to level up your Kotlin and Jetpack knowledge! Each episode covers a specific set of APIs, talking both about how to use the APIs but also showing how APIs work under the hood. All the episodes have accompanying blog posts and most of them link to either a sample or a codelab to make it easier to follow and dig deeper into the content. We also had a live Q&A featuring Jetpack and Kotlin engineers. Episode 1 - Using KTX libraries In this episode we looked at how you can make your Android and Jetpack coding easy, pleasant and Kotlin-idiomatic with Jetpack KTX extensions . Currently, more than 20 libraries have a KTX version. This episode covers some of the most important ones: core-ktx that provides...

Prefer Storing Data with Jetpack DataStore

Gambar
Posted by Florina Muntenescu , Android Developer Advocate, Rohit Sathyanarayana, Software Engineer Welcome Jetpack DataStore, now in alpha - a new and improved data storage solution aimed at replacing SharedPreferences. Built on Kotlin coroutines and Flow, DataStore provides two different implementations: Proto DataStore , that lets you store typed objects (backed by protocol buffers ) and Preferences DataStore , that stores key-value pairs . Data is stored asynchronously, consistently, and transactionally, overcoming most of the drawbacks of SharedPreferences. SharedPreferences vs DataStore * SharedPreferences has a synchronous API that can appear safe to call on the UI thread, but which actually does disk I/O operations. Furthermore, apply() blocks the UI thread on fsync() . Pending fsync() calls are triggered every time any service starts or stops, and every time an activity starts or stops anywhere in your application. The UI thread is blocked on pending fsync() calls schedul...

Announcing Jetpack Compose Alpha!

Gambar
Posted by Karen Ng , Director, Product Management Today, we’re releasing the alpha of Jetpack Compose , our modern UI toolkit designed to help you quickly and easily build beautiful apps across all Android platforms, with native access to the platform APIs. Bring your app to life with dramatically less code, interactive tools, and intuitive Kotlin APIs. No matter where you’re working from -- whether it’s your kitchen table or an office, we know you need a programming language, an IDE and a powerful UI framework that can save you time and reduce how much code you need to write. So we built Jetpack Compose to make you (and us!) more productive with building UI. We started with Android Jetpack — taking the hardest, most common developer problems on Android and creating a suite of libraries that ensure high quality apps that work across all versions of the platform. Today, 84% of the top 10,000 apps in the Play store are using a Jetpack library. Then we heard how developers love Kotlin,...

11 Weeks of Android: Jetpack

Gambar
Posted by Diana Wong, Product Manager, Android Jetpack This blog post is part of a weekly series for #11WeeksOfAndroid . For each of the #11WeeksOfAndroid , we’re diving into a key area so you don’t miss anything.This week, we spotlighted Jetpack ; here’s a look at what you should know. The big news In 2018, we launched Android Jetpack as a suite of libraries to help developers follow best practices, reduce boilerplate code, and write code that works consistently across Android versions and devices. We are excited about the growth we’ve seen and the incredible feedback that developers like you have shared with us. 47% of the top 1000 apps use 2 or more Jetpack libraries, not including core libraries like AppCompat or Lifecycle. Our work over the past year has been about making the basics easy for Android developers, so that you can focus on the code you care about. We have released many updates to our existing libraries as well as new libraries to help make building high-quality apps ...

Decrease startup time with Jetpack App Startup

Gambar
Posted by Yacine Rezgui , Developer Advocate and Rahul Ravikumar , Software Engineer Application startup time is a critical metric for any application. Users expect apps to be responsive and fast to load. When an application does not meet this expectation, it can be disappointing to users. This poor experience may cause a user to rate your app badly on the Play store, or even abandon your app altogether. Jetpack App Startup is a library that provides a straightforward, performant way to initialize components at application startup. Both library developers and app developers can use App Startup to streamline startup sequences and explicitly set the order of initialization. Apps and libraries often rely on having components ( WorkManager , ProcessLifecycleObserver , FirebaseApp etc.) initialized before Application.onCreate() . This is usually achieved by using content providers to initialize each dependency. Instead of defining separate content providers for each component that needs...

Improving inter-activity communication with Jetpack ActivityResult

Gambar
Posted by Yacine Rezgui , Developer Advocate Whether you're requesting a permission, selecting a file from the system file manager, or expecting data from a 3rd party app, passing data between activities is a core element in inter-process communication on Android. We’ve recently released the new ActivityResult APIs to help handle these activity results. Previously, to get results from started activities, apps needed to implement an onActivityResult() method in their activities and fragments, check which requestCode a result is referring to, verify that the requestCode is OK, and finally inspect its result data or extended data. This leads to complicated code, and it doesn’t provide a type-safe interface for expected arguments when sending or receiving data from an activity. What are the ActivityResult APIs? The ActivityResult APIs were added to the Jetpack activity and fragment libraries, making it easier to get results from activities by providing type-safe contracts. These ...

What’s New in Navigation 2020

Gambar
Posted by Jeremy Woods, Software Engineer, Android UI Toolkit The latest versions of the Jetpack Navigation library (2.2.0 and 2.3.0) added a lot of requested features and functionality, including dynamic navigation , navigation back stack entries , a library for navigation testing , additional features for deep linking , and more. Let’s go over the most important changes, see what problems they solve, and learn how to use them! Dynamic Navigation We’ve updated Navigation to simplify adding dynamic feature modules for your application. Previously, implementing navigation between destinations defined in dynamic feature modules required a lot of work. Before you could navigate to the first dynamic destination, you needed to add the Play Core library and the Split Install API to your app. You also needed to check for and download the dynamic module. Once downloaded, you could then finally navigate to the destination. On top of this, if you wanted to have an on-screen progress bar for th...

Getting on the same page with Paging 3

Gambar
Posted by Florina Muntenescu , Android Developer Advocate Getting on the same page with Paging 3 The Paging library enables you to load large sets of data gradually and gracefully, reducing network usage and system resources. You told us that the Paging 2.0 API was not enough - that you wanted easier error handling, more flexibility to implement list transformations like map or filter , and support for list separators, headers, and footers. So we launched Paging 3.0 (now in alpha02), a complete rewrite of the library using Kotlin coroutines (still supporting Java users) and offering the features you asked for. Paging 3 highlights The Paging 3 API provides support for common functionality that you would otherwise need to implement yourself when loading data in pages: Keeps track of the keys to be used for retrieving the next and previous page. Automatically requests the correct next page when the user scrolls to the end of the loaded data. Ensures that multiple requests aren’t triggere...