Upload
abdellah-selassi
View
992
Download
4
Tags:
Embed Size (px)
Citation preview
By the Numbers
Google Play
1 million apps available (July 2013)
50 billion apps downloaded (May 2013)
Devices
1.5 million activations daily (March 2013)
1 billion users (June 2014)
Android DesignMaterial Design
Tangible surfaces
Bold, beautiful aesthetic
Meaningful motion
Adaptive design
Material Design: Learn More About It!
• Material Design spec · www.google.com/design/spec
• Articles, DevBytes, DesignBytes, SDK Reference · developer.android.com
Material theme
theme=“Android.Material” colors icons touch feedback ripples activity transitions enabled
Theme colors
Grayscale assets tinted by theme colors
colorPrimaryDark colorAccent colorControlNormal colorControlActivated colorControlHighlight colorButtonNormal
Dynamic colors
Palette Derives dominant colors from images Available in v7 support library
Tinting drawables Drawable.setTint() Drawable.setTintMode()
Material APIs: Graphics
Realtime soft shadows View.setElevation() View.setTranslationZ()
Shaped views and shadows Outline View.setOutlineProvider() View.setClipToOutline()
Material APIs: AnimationsActivity Transitions With shared elements Also, Fragment Transitions!
Animation curves Time and space
Animated Reveal
Material APIs: IconographyTouch feedback ripples RippleDrawable
Vector icons VectorDrawable AnimatedVectorDrawable
State animations StateListAnimator AnimatedStateListDrawable
VectorDrawable<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="128dp" android:width="128dp" android:viewportHeight="480" android:viewportWidth="480" > <group android:name="root" android:translateX="240.0" android:translateY="240.0" > <path android:name="favorite" android:fillColor="#ff000000" android:pathData="M2.100006104,-6 C0.1449127197,-6,1.600006104,-5.975006104,0,-5.975006104 C-1.574996948,-5.975006104,0.00309753418,-6-1.949996948-6 C-4.492996216,-6,-5.949996948,-3.718399048,-5.949996948,-1.149993896 C-5.949996948,2.379302979,-5.699996948,5.100006104,0,5.100006104 C5.699996948,5.100006104,6,2.379302979,6,-1.149993896 C6,-3.718399048,4.643005371-6,2.100006104-6" /> </group> </vector>
Nested ScrollingDelegate to scrollable parent containers when appropriate
ViewParent
onStartNestedScroll()
onNestedScroll()/onNestedPreScroll()
onNestedFling() / onNestedPreFling()
Support Lib
CardView
RecyclerView
Palette
RoundedBitmapDrawable
ViewPropertyAnimatorCompat
NotificationCompat
WebView updates
Chromium M37 security, stability, bug fixes
New support for open standards WebAudio WebGL WebRTC
Updates from Play Store
Document- Centric AppsTo create a new document: Intent.FLAG_ACTIVITY_NEW_DOCUMENT <activity documentLaunchMode=”always”>
Manage tasks via ActivityManager.getAppTasks()
Material theme background: card-shaped, shadow-casting foreground: dark text and actions all icons now treated as silhouettes
Accent color Notification.Builder.setColor()
Everything else you know and love Expanded views, action buttons, custom views
Small icon badging2014: Notifications in L
Heads-up notifications
Reserved for things the user needs to deal with High priority Involving people Makes noise fullScreenIntent
Designed to be easy to act on and easy to ignore!
PUBLIC (anyone can read)
AUTHENTICATION (the lockscreen)
SECRET (only you know it’s there)
PRIVATE (only you can read)
VISIBILITY_PUBLIC • notifications that are safe
to show outside the lockscreen, out in public, to anyone
VISIBILITY_PRIVATE (classic Android notifications) • only icons visible without
authentication
VISIBILITY_SECRET • invisible until you unlock
SPHERES OF VISIBILITY
publicVersion
OpenGL
OpenGL ES 3.1 NDK and SDK bindings Backward-compatible with OpenGL ES 2.0 and 3.0 Compute shaders & separate shaders Shading language improvements Manifest <uses-feature android:glEsVersion=“0x00030001”/>
Android Extension Pack Superset of OpenGL ES 3.1 Tessellation, geometry shaders, shader storage buffers, images, and atomics, etc.
Camera and Audio
New android.hardware.camera2 APIs Fine-grained capture and image processing RAW capture (DNG) Programmatically access available devices
New audio buffering and encoding capabilities Lower-latency audio input
Other Media EnhancementsMediaSession Respond to transport controls
MediaBrowser Browse media content exposed by apps
MediaProjection Screen and audio capture
PdfRenderer Render PDF as a bitmap
ART
Replaces Dalvik Available in KitKat Now enabled by default
Faster! Better! Newer! Cooler! Ahead-of-Time Compilation Smaller GC pauses Dedicated space for large objects (bitmaps) Moving collector (background apps)
Android Runtime
Power: Project Volta
Battery stats $ adb shell dumpsys batterystats Global and per-UID statistics options: --help
Battery Historian (github.com/google/battery-historian) like systrace for power events
Measuring your app’s battery efficiency
Power: Battery Historian
# turn on full wakelock reporting $ adb shell dumpsys batterystats --enable full-history
# clear out old stats $ adb shell dumpsys batterystats --reset
# now run your app, collect data $ adb bugreport > bugreport.txt
# visualize! $ historian.py bugreport.txt > out.html
Example
Power: JobScheduler
You want to do some work when: data is cheap/fast device is plugged in or idle
Possible to do this manually
… but now there’s JobScheduler!
intelligent background processing
Power: JobScheduler
JobInfo uploadTask = new JobInfo.Builder(jobId, componentName) .setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED) .setRequiresCharging(true) .setRequiresDeviceIdle(true) .build();JobScheduler jobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);jobScheduler.schedule(uploadTask);
example
Storage: DocumentTrees
If you’re using the new Storage Access Framework (API 19)
You can now ask for a whole directory! @see Intent.ACTION_OPEN_DOCUMENT_TREE
Then explore the directory and its contents @see DocumentsContract.buildChildDocumentsUriUsingTree(), .buildDocumentUriUsingTree()
New tools for working with directories
Storage: getExternalMediaDirs
• Context.getExternalMediaDirs() · File[] array of package-specific places for media
• like Context.getExternalFilesDirs() · plus automatic MediaStore support
A clean, well-lighted place for media
Multi-Networking
When you need a particular kind of network connection SMS unmetered specific carrier feature
ConnectivityManager.requestNetwork(NetworkRequest, NetworkCallback)
Bluetooth LE
Android 4.3: Bluetooth Low Energy (BLE)
New in Lollipop: BLE peripheral device support Your app can can provide services and scan for services
android.bluetooth.le " BluetoothLeScanner " BluetoothLeAdvertiser
Enterprise & Education
Managed profile (Data segregation)
Profile vs. Device owner
DevicePolicyManager
Screen Pinning