The Android L Developer Preview introduced a plethora of new APIs for developers to take advantage of, including Material Design, notifications, and new animations, to name a few. Xamarin developers can access these new APIs right now with our recently announced preliminary support in Xamarin.Android. With Google expected to release Android L fully this fall, it will be increasingly important to take advantage of these new APIs and get your app up-to-date. In the slides from our Android L and So Much More webinar on Tuesday, September 16th, Developer Evangelist James Montemagno walks through the top new and updated APIs in the release. In addition to everything new in the Android L Developer Preview, he also covers everything new in the Google Play Services, Support Libraries, Android Wear, and Android TV SDKs.
Citation preview
1. Android L and So Much More James Montemagno Developer
Evangelist, Xamarin @JamesMontemagno
2. New in Android Android L Developer Preview Android Wear
Android TV
3. Android L Developer Preview
4. Android L Major Features ART Runtime Material Design
Widgets, Views, and Shadows Animations Notifications
Compatibility
5. Android L Major Features ART Runtime Ahead-of-Time
compilation Improved Garbage Collection Improved Debugging
Support
6. Android L Major Features Material Design Material metaphor
Bold, graphic, intentional Motion provides meaning
google.com/design/spec/material-design/introduction.html
7. Brand new style for applications. Theme.Material
Theme.Material.Light Theme.Material.Light. DarkActionBar Material
Design
8. colorPrimary App Branding Color colorPrimaryDark Status bar
& contextual bars colorAccent Theme UI Controls (ie. checkbox)
Material Design Color Palette
9. Material Design Color Palette
10. Extract Prominent Colors from Image 6 Palettes Generated
Material Design Palettes Generate a color pallet from an image
https://www.nuget.org/packages/Xamarin.Android.Support.v7.Palette/
11. Material Design Drawable Tint Bitmaps as alpha maps
android:tint=@color/blue
12. Demo
13. Android L Major Features View and Shadows CardView
RecyclerView Elevation
14. CardView Wrap any view in a CardView
https://www.nuget.org/packages
Xamarin.Android.Support.v7.CardView/
15. RecyclerView High speed efficient ListView Includes layout
manager for positioning items Default animations for common item
operations
https://www.nuget.org/packages/Xamarin.Android.Support.v7.RecyclerView/
16. Elevation android:elevation=2dp View.SetTranslationZ method
Z = elevation + translationZ
17. Demo
18. Android L Major Features Animations Touch Feedback Reveal
Activity Transitions
19. Animation Surface reaction
20. Animation Surface reaction Material response
21. Animation Surface reaction Material response Radial
action
22. Default Touch Feedback Animation: RippleDrawable Set
Background to: ?android:attr/selectableItemBackgro und
?android:attr/selectableItemBackgro undBorderless Create custom
RippleDrawable using the ripple element Animation Touch
Feedback
24. Animation Activity Transitions Custom animations for enter
and exit transitions of activities Enter: How views in the activity
enter Exit: How view in activity exit Shared Elements: How views
that are shared between 2 activities animate
25. Android L Major Features Notifications Lock Screen
Notifications Notifications Metadata Unified Notifications
26. New APIs Lock Screen Notifications (Android L)
Android.App.Notification.Builder.SetVisibility() Private: Shows
basic information such as icon, but hides full content Public: Show
the notification's full content Secret: Show nothing, excluding
even the notifications icon
27. New APIs Notifications Metadata (Android L) SetCategory():
Tells the system how to handle notifications when the device is in
Do not Disturb SetPriority(): Set to Max or High to appear in a
small floating window if the sound also has a vibration or sound.
AddPerson(): Add a list of people to notification.
28. Unified Notifications Standard and Extended
29. Demo
30. Android L Major Features Compatibility & More New APIs
Android L Small Features Google Play Services via NuGet
31. New APIs Compatibility Material Theme Only available in
Android L Developer Preview o Define theme that inherits from older
theme (like Holo) in res/values/styles.xml o Define them with same
name that inherits from Material in res/values-v21/ styles.xml o
Set theme as your apps theme in manifest file Layouts Do not use
any of the new XML attributes from Android L Developer Preview,
they will not work with previous versions of Android. You must
provide alternative layouts if you wish to use them o L Preview
Layouts: res/layout-v21/ o Alternative Layouts: res/layout/ o Do
avoid duplication of code, define styles in res/values/ o Modify
the style in res/values-v21/ for new APIs
32. New APIs Compatibility UI Widgets Support v7: RecyclerView
& CardView o Limitations (pre-L Preview): o CardView falls back
to programmatic shadows implementation using additional padding o
CardView does not clip its children that intersect with rounded
corners Animations Following are Android L Developer Preview ONLY:
o Activity Transitions o Touch feedback o Reveal animations o
Path-based animations
33. Android L Small Features Camera Enhanced image and video
capturing. Capture Raw sensor data. Multi-networking Dynamically
scan for available network with specific capability and
automatically connect. BLE Peripheral Mode Apps that connect to
devices such as pedometer or health monitor and transfer data to
another BLE device. Document-Centric Recents Job Scheduler
34. Google Play Services via NuGet Play Game Services: event
based challenges, saved games, and game profiles App Indexing API
Google Cast: Media tracks for closed captioning Wallet: Save to
Wallet, geo-fenced in-store notifications, split tender between
wallet & card Analytics: Measure product impressions/product
clicks Mobile Ads: in-app purchase ads Dynamic Security
Provider
35. Android Wear
36. Android Wear Extending Apps Enhance Existing Apps Support
v4 Notification API o WearableExtender Inbox Style Cards Voice
Input
37. Android Wear Notifications + Expanded
38. Android Wear Notifications - Actions
39. Android Wear Building Apps Companion App Android app that
runs on a wearable New Themes New UI Widgets BoxInsetLayout
CircledImageView WearableListView More
http://www.nuget.org/packages/Xamarin.Android.Wear/
40. Android Wear Sync Data Exposed via Google Play Services
Data API o Sync datastore between phone and wearable Message API o
Send small payloads and simple o communication
http://www.nuget.org/packages/Xamarin.GooglePlayServicesJellyBean/
44. Android TV Features Made for TV Pre-built fragments for
browsing & interacting with media catalogs In-App Searching
Voice input for searching content Recommendations Suggest content
from your app Chromecast Built-in
45. Android TV ADT-1 Development Kit
http://developer.android.com/tv/index.html
46. Android TV + Xamarin Available via NuGet
https://www.nuget.org/packages/Xamarin.Android.Support.v17.Leanback
Samples: https://github.com/xamarin/monodroid-samples
47. Android Recap Android L Developer Preview Material Design
Views & Animations Notifications Android Wear Notifications
& Companion Apps Android TV
48. Resources Tips for Your First Wear App
http://blog.xamarin.com/tips-for-your-first-android-wear-app/
Android L Documentation
http://developer.xamarin.com/guides/android/platform_features/android_l/introduc
tion_to_android_l/ Samples
http://developer.xamarin.com/samples/android/
49. Dive Deep into Mobile Development with the Experts!
xamarin.com/evolve
50. Q & A James Montemagno Developer Evangelist, Xamarin
@JamesMontemagno