Google I/O 2021 is over. What’s up? Android & Play at Google I/O 2021
Developer Keynote (Google I/O ’21)
For the Android part, the main ones are:
Android 12
- user safety.
- performance; improved app startup; customizable launch animations.
- user experience; widgets.
Create beautiful apps, easier
Modern Android development.
- Updates to Android Studio.
- Kotlin: Kotlin Symbol Processing.
- Jetpack: Various libraries and Compose.
Build across screens.
- All kinds of screens.
- Voice.
- Watches: Health services.
The top 3 things to know in Modern Android Development | Android @ Google I/O’21
Top three Topics for Android development:
- Jetpack: A new version of Jetpack Libraries has been released.
- Tooling: Update to Android Studio, with WorkManager Inspector, UI Inspector support for View and Compose.
- Kotlin.
What’s new in Android | Keynote
Android 12 -> S
.
@Deprecated
-> deprecated.- Color.
- Widgets.
- Launch animations: The system comes with Launch animations that can be customized.
- Notifications: New Template style;
Trampoline
(?) Optimize the short delay for opening notification. - Toasts: with icon, indicating which APP plays the Toasts. Control the number.
- Picture in Picture improvement.
- ImageView has a set effect that blurs photos.
- You can customize the blur using theme.
- List stretch overscroll.
- Graphics: AVIF. You can filter supported media types.
- Privacy: Some improvements to permission; [Fixed] Clipboard contents now have toasts indicating where they came from foreground restrictions.
What’s new in Android development tools | Session
Android Studio version number design.
- The Preview tool allows you to set landscape, customize dimensions, display blueprints, and play animation. Compose has an interactive Preview mode.
- Accessibility test framework scanner.
- Layout Validation for multiple screens.
- Folding screen, watch.
- The simulator can also simulate heart Rate.
- snapshots test.
- The tasks of the WorkManager.
- Migrate to Non-Transitive R Classes…
What ‘s new in Jetpack | Session
Explains Jetpack’s origins and current status. What alpha and beta means.
- Experimental Annotations -> Stable.
- CameraX -> Stable.
- AppSearch -> Alpha.
- DataStore -> replace SharedPreferences.
- Security Crypto -> Stable.
- Hilt -> Stable.
- WorkManager -> Stable. (Android Studio has also released a new WorkManager Inspector.)
- Room -> Stable.
- ConstraintLayout -> Stable. MotionLayout + Motion Editor.
- Fragment -> Stable.
(see the release notes: developer.android.com/jetpack/and… .). Rebuilding the FragmentManager; Callback for get result; Some apis are deprecated, and Fragment StrictMode can be used to check if they are still used in a project.
- Navigation -> Alpha. Multiple Backstacks are now supported.
- Google Shortcuts -> Alpha.
- EmojiCompat -> Alpha. (included by default after AppCompat 1.4.0.)
- Paging -> Stable.
- Macrobenchmark -> Alpha. (App launch and scroll efficiency; local/CI.)
- Compose integrations.
What’s new in Jetpack Compose | Session
Why do we need a new UI Toolkit? -> To accommodate more modern development methods.
faster & easier.
Compose converts the data into the UI.
Checkbox example:
-> Single source of truth. There are no other states to sync.
Add arguments and callbacks to method arguments:
- You completely describe your UI for a given state.
- The framework updates your UI when the state changes.
Here is a diagram. It is recommended that the ViewModel expose a Screen state, centrally manage it, and deliver it to each composable.
It’s also good for testing.
Compose implements Material Design and provides components, as well as theming System.
There is an implementation explanation for the OWL App.
And traditional view interop.
State of Kotlin on Android | Session
- Kotlin is becoming more and more popular, not only for apps, but also for servers.
- Kotlin Symbol Processing currently releases alpha.
- Compiler upgrade.
- Lots and lots of KTX libraries.
- Protobuf support: developers.google.com/protocol-bu…
- Coroutines debugger -> coming soon. You can jump between threads and view information.
What’s new in Android Gradle plugin | Session
New APIs in the Android Gradle Plugin
Using Jetpack libraries in Compose | Session
Jetpack Compose works well with other libraries in Jetpack.
Top 12 tips to get ready for Android 12 | Session
Getting Ready for Android 12.
- Developer Options -> App Compatibility Changes.
- 15.0.7 Foreground Services were designed for multi-tasking and completing a user action. -> Enabling Foreground Services from background will be restricted.
- Expedited Jobs with WorkManager APIs.
- User may turn off the mic and camera sensors using mic and camera toggles.
- Apps that have not been used for an extended period will be hibernated. (permissions, storage, services)
- Nearby device permission. Decouple Bluetooth scanning from Location.
- MAC address restriction.
- Exporting Safe Component. Exporting an Intent filter must be explicitly declared.
- Custom notifications deprecation.
- App link improvements.
- WebView Samesite.
- New stretch overscroll.