Android lollipop for developers

145
What’s new in lollipop? .(by Royi Benyossef (+royiby The most important things you did not know about

Transcript of Android lollipop for developers

Page 1: Android lollipop for developers

Whatrsquos new in lollipop

(by Royi Benyossef (+royiby

The most important things you did not know about

Who

Shameless plug by Royi Benyossef (+royiby)

Royi benyossef

Android developer since 2008

GDG Herzeliya co-founder

Android speaker and lecturer

Android Mentor at CampusTLV

Android GDE 2013 2014

Android group leader at Vidmind

Motivation

Whatrsquos new in lollipop

Motivation

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 2: Android lollipop for developers

Who

Shameless plug by Royi Benyossef (+royiby)

Royi benyossef

Android developer since 2008

GDG Herzeliya co-founder

Android speaker and lecturer

Android Mentor at CampusTLV

Android GDE 2013 2014

Android group leader at Vidmind

Motivation

Whatrsquos new in lollipop

Motivation

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 3: Android lollipop for developers

Motivation

Whatrsquos new in lollipop

Motivation

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 4: Android lollipop for developers

Motivation

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 5: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 6: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 7: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Material design

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 8: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 9: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Android TV

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 10: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Android Auto

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 11: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Android AUTO

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 12: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 13: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

ART

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 14: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 15: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

Project Volta

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 16: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 17: Android lollipop for developers

What most people know

Whatrsquos new in lollipop

More than 5000 APIs were changed

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 18: Android lollipop for developers

Enough

Whatrsquos new in lollipop

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 19: Android lollipop for developers

Point

Whatrsquos new in lollipop

Most people know

Very little

Titles only

No action items

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 20: Android lollipop for developers

Point

Whatrsquos new in lollipop

Is that helpful

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 21: Android lollipop for developers

Point

Whatrsquos new in lollipop

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 22: Android lollipop for developers

Letrsquos get started

Whatrsquos new in lollipop

Down to

business

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 23: Android lollipop for developers

Security

Whatrsquos new in lollipop

Few changes to make your app and

the device safer

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 24: Android lollipop for developers

Security - Service

Whatrsquos new in lollipop

ContextbindService()

Requires explicit intent (no intent filters)

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 25: Android lollipop for developers

Security - Token

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 26: Android lollipop for developers

Security - WebView

Whatrsquos new in lollipop

API level 21

No cookies

No Mixed content

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 27: Android lollipop for developers

Security - WebView

Whatrsquos new in lollipop

API level 21

setAcceptThirdPartyCookies()

setMixedContentMode()

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 28: Android lollipop for developers

Security - WebView

Whatrsquos new in lollipop

API lt 21

Allows cookies and mixed content

All content loaded at once

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 29: Android lollipop for developers

Security - WebView

Whatrsquos new in lollipop

API level 21

Can load all content at once

enableSlowWholeDocumentDraw()

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 30: Android lollipop for developers

Security - permissions

Whatrsquos new in lollipop

Custom permissions uniqueness is checked

cross apps

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 31: Android lollipop for developers

Security - permissions

Whatrsquos new in lollipop

Only one app can use a custom permission

at a time

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 32: Android lollipop for developers

Security - TLSSSL

Whatrsquos new in lollipop

TLSv12 TLSv11

Cipher suites

a AES-GCM (AEAD)

b MD5 3DES export and static key ECDH

c Forward Secrecy (ECDHE and DHE)

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 33: Android lollipop for developers

Security - Provisioning

Whatrsquos new in lollipop

Device admin

Control provisioning of apps on device

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 34: Android lollipop for developers

Security - Admin

Whatrsquos new in lollipop

ACTION_PROVISION_MANAGED_PROFIL

E

Intent to trigger provision apps and actions

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 35: Android lollipop for developers

Security - Admin

Whatrsquos new in lollipop

onProfileProvisioningComplete()

callback event for provisioning completion

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 36: Android lollipop for developers

Security - Admin

Whatrsquos new in lollipop

setProfileEnabled()

enableSystemApp()

Actions possible upon provisioning

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 37: Android lollipop for developers

Security - Provisioning

Whatrsquos new in lollipop

Device owner

Mainly for education allows controlling devices

operations remotely

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 38: Android lollipop for developers

Security - owner

Whatrsquos new in lollipop

Screen pinning

Temporary restriction of users

Status bar blank

No notifications

Home amp recents are hidden

User locked in app

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 39: Android lollipop for developers

Security - owner

Whatrsquos new in lollipop

Manual Screen pinning

Settings gt Security gt Screen Pinning

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 40: Android lollipop for developers

Security - owner

Whatrsquos new in lollipop

Programmatic Screen pinning

startLockTask()

setLockTaskPackages()

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 41: Android lollipop for developers

Security

Whatrsquos new in lollipop

Concept

More control

more security

Better tools

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 42: Android lollipop for developers

User interface

Whatrsquos new in lollipop

Changes and updates to facilitate better UI

and UX

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 43: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

concept Facilitating multitasking and

easing use by easy switching between

concurrent activities

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 44: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

How do i create a new document

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 45: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

startActivity()+

FLAG_ACTIVITY_NEW_DOCUMENT

= new document

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 46: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = intoExisting

= new document (refreshes existing)

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 47: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

ltactivitygt +

documentLaunchMode = always

= new document (start new one -

ALWAYS)

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 48: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

Some attributes to use

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 49: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+androidmaxRecents

Limit max instances

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 50: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

ltapplicationgt+

androidpersistableMode

Do you want state to persist across

reboots

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 51: Android lollipop for developers

UI - documents

Whatrsquos new in lollipop

setTaskDescription()

Do you want the activity to look different

once called from

recents

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 52: Android lollipop for developers

UI - WebView

Whatrsquos new in lollipop

Version

Chromium M37

Default header-agent

37000

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 53: Android lollipop for developers

UI - WebView

Whatrsquos new in lollipop

Concept

security

access

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 54: Android lollipop for developers

UI - WebView

Whatrsquos new in lollipop

PermissionRequest

Allows access to secured hardware

(camera microphone)

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 55: Android lollipop for developers

UI - WebView

Whatrsquos new in lollipop

onShowFileChooser()

Allows access to images and files

from storage

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 56: Android lollipop for developers

UI - capturing amp sharing

Whatrsquos new in lollipop

Concept capture screen easily and

securely for better sharing

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 57: Android lollipop for developers

UI - capturing amp sharing

Whatrsquos new in lollipop

createScreenCaptureIntent()

Ask permission to capture display

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 58: Android lollipop for developers

UI - capturing amp sharing

Whatrsquos new in lollipop

createVirtualDisplay()

Capture content

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 59: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

Concept create real-looking UI and

UX

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 60: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

RecyclerView

Like ListView only without pulling your

hairs out

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 61: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

View shadows

consistent to elevations

just like real life

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 62: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

Transition animations and effects

Fun

Dynamic

Flowing

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 63: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

View state based property

animators

Control your animations better for a

stronger effect

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 64: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

XML vector graphics

Make your designers happy

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 65: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

Image color detection

Color your app according to the

content

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 66: Android lollipop for developers

UI - Material design

Whatrsquos new in lollipop

PalettegenerateAsync(bitmap new PalettePaletteAsyncListener()

public void onGenerated(Palette palette)

Do something with colors

)

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 67: Android lollipop for developers

Notifications

Whatrsquos new in lollipop

More secure

More places

More actions

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 68: Android lollipop for developers

Lock screen Notifications

Whatrsquos new in lollipop

setVisibility()

Sets the desired privacy level

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 69: Android lollipop for developers

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PUBLIC

Shows everything

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 70: Android lollipop for developers

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_SECRET

Shows nothing (not even the icon)

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 71: Android lollipop for developers

Lock screen Notifications

Whatrsquos new in lollipop

VISIBILITY_PRIVATE

Shows basic information

Allows alternate message with

setPublicVersion()

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 72: Android lollipop for developers

Notifications meta data

Whatrsquos new in lollipop

New data to be set in notifications

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 73: Android lollipop for developers

Notifications meta data

Whatrsquos new in lollipop

setCategory()

How to handle your notification in priority

mode

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 74: Android lollipop for developers

Notifications meta data

Whatrsquos new in lollipop

setPriority()

Example MAX or high priority will appear in a

small popup

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 75: Android lollipop for developers

Notifications meta data

Whatrsquos new in lollipop

addPerson()

Connect notification to a person and not an

app

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 76: Android lollipop for developers

Tools and APIs

Whatrsquos new in lollipop

Infrastructural API changes for efficiency

performance and security

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 77: Android lollipop for developers

Project Volta

Whatrsquos new in lollipop

Helps developers preserve battery life

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 78: Android lollipop for developers

Project Volta

Whatrsquos new in lollipop

JobScheduler (+ JobInfo)

Request system to schedule jobs by event

urgency or deadline

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 79: Android lollipop for developers

JobInfo uploadTask = new JobInfoBuilder(mJobId

mServiceComponent JobService component )

setRequiredNetworkCapabilities(JobInfoNetworkTypeUNMETERED)

build()

JobScheduler jobScheduler =

(JobScheduler)

contextgetSystemService(ContextJOB_SCHEDULER_SERVICE)

jobSchedulerschedule(uploadTask)

Project Volta

Whatrsquos new in lollipop

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 80: Android lollipop for developers

Project Volta

Whatrsquos new in lollipop

Battery Historian amp dumpsys batterystat

Battery history amp projection

Mobile ms per packet

httpsgithubcomgooglebattery-historian

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 81: Android lollipop for developers

Project Volta

Whatrsquos new in lollipop

$ adb shell dumpsys batterystats --charged ltpackage-namegt

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 82: Android lollipop for developers

Project Volta

Whatrsquos new in lollipop

Whatrsquos in it

for me

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 83: Android lollipop for developers

Volta - motivation

Whatrsquos new in lollipop

Growth in wearables usage

Better battery usage stats on devices

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 84: Android lollipop for developers

Graphics

Whatrsquos new in lollipop

Concept OpenGL ES 31++

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 85: Android lollipop for developers

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

Compute Shaders

Separate shader objects

Indirect drawing

Textures (stencils and multisample)

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 86: Android lollipop for developers

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature androidglEsVersion=0x00030001 gt

ltmanifestgt

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 87: Android lollipop for developers

Graphics - Android ext pack

Whatrsquos new in lollipop

Fragment shader support

Tessellation amp Geometry shaders

ASTC (LDR) texture support

Per-shader actions and blend modes

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 88: Android lollipop for developers

Graphics - OpenGL ES 31

Whatrsquos new in lollipop

ltmanifestgt

ltuses-feature

androidname=ldquoandroidhardwareopenglesaeprdquo

androidrequired=true gt

ltmanifestgt

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 89: Android lollipop for developers

ART

Whatrsquos new in lollipop

AOD compilation

Improved GC

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 90: Android lollipop for developers

ART - at risk

Whatrsquos new in lollipop

JNI with CC++

Non-standard tools

Obfuscators

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 91: Android lollipop for developers

64-bit NDK

Whatrsquos new in lollipop

Full 32-bit support

increased address space

improved performance

OpenGL ES (31)

OpenSSL

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 92: Android lollipop for developers

Media

Whatrsquos new in lollipop

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 93: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Concept

Backward compatible

Easy to use

Async

Threadsafe

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 94: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Get cameras

getCameraIdList()

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 95: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Use a camera

openCamera()

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 96: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Create a session (single-shot burst etc)

CameraCaptureSession

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 97: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Get notified when a picture is captured

with the result

CameraCaptureSessionCaptureCallback

onCaptureCompleted()

CaptureResult

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 98: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

Be aware of the hardware

CameraCharacteristics

INFO_SUPPORTED_HARDWARE_LEVEL

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 99: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_LEGA

CY

Minimum support (like old Camera API)

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 100: Android lollipop for developers

Media - Camera

Whatrsquos new in lollipop

INFO_SUPPORTED_HARDWARE_LEVEL_FUL

L

Full support

Manual control

Post processing

HD

High frame rates

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 101: Android lollipop for developers

Media - Audio

Whatrsquos new in lollipop

Concept

Accurate

Convenient

Efficient

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 102: Android lollipop for developers

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply data in ENCODING_PCM_FLOAT

format for accuracy and as a ByteBuffer

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 103: Android lollipop for developers

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Supply as a ByteBuffer for convenience

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 104: Android lollipop for developers

Media - Audio

Whatrsquos new in lollipop

AudioTrack

Use WRITE_NON_BLOCKING for easy

buffering and multithreading

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 105: Android lollipop for developers

Media - playback control

Whatrsquos new in lollipop

RemoteControlClient is dead long

live MediaSession and

MediaController

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 106: Android lollipop for developers

Media - playback control

Whatrsquos new in lollipop

MediaSession

Unified interface for all playback controls on

Wear TV and more

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 107: Android lollipop for developers

Media - playback control

Whatrsquos new in lollipop

MediaSessionToken

Identifies a MediaSession securely and

with thread safety

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 108: Android lollipop for developers

Media - playback control

Whatrsquos new in lollipop

MediaControllerTransportControls

sends actions

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 109: Android lollipop for developers

Media - playback control

Whatrsquos new in lollipop

MediaControllerCallback

gets responses

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 110: Android lollipop for developers

Media - Browsing

Whatrsquos new in lollipop

Browse the content library of any app

that allows it

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 111: Android lollipop for developers

Media - Browsing

Whatrsquos new in lollipop

MediaBrowserService

Create a MediaSession identified by a

MediaSessionToken to connect to a

MediaBrowser

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 112: Android lollipop for developers

Storage

Whatrsquos new in lollipop

Concept

From files to documents

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 113: Android lollipop for developers

Storage

Whatrsquos new in lollipop

DocumentsProvider

Handles access to all documents in

the system

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 114: Android lollipop for developers

Storage

Whatrsquos new in lollipop

OPEN_DOCUMENT_TREE

Intent filter to open a directory

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 115: Android lollipop for developers

Storage

Whatrsquos new in lollipop

buildChildDocumentsUriUsingTree()

buildDocumentUriUsingTree()

Browse documents

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 116: Android lollipop for developers

Storage

Whatrsquos new in lollipop

createDocument()

renameDocument()

deleteDocument()

Guess

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 117: Android lollipop for developers

Storage

Whatrsquos new in lollipop

MediaScannerConnection

Scan for new content on device

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 118: Android lollipop for developers

Connectivity

Whatrsquos new in lollipop

Concept

redundancy and energy efficiency

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 119: Android lollipop for developers

Connectivity - multiple

Whatrsquos new in lollipop

Concept

Scan for best network and connect

to more than one dynamically

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 120: Android lollipop for developers

Connectivity - multiple

Whatrsquos new in lollipop

ConnectivityManagerNetworkCallback

Get results for an applicable

NetworkRequest

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 121: Android lollipop for developers

Connectivity - multiple

Whatrsquos new in lollipop

requestNetwork()

Connect upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 122: Android lollipop for developers

Connectivity - multiple

Whatrsquos new in lollipop

registerNetworkCallback()

Get notified upon discovery

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 123: Android lollipop for developers

Connectivity - multiple

Whatrsquos new in lollipop

onAvailable() + Network

Get information regarding found network

upon discovery

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 124: Android lollipop for developers

Connectivity - BLE

Whatrsquos new in lollipop

Concept you can be a Bluetooth

low energy peripheral device

BLUETOOTH_ADMIN

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 125: Android lollipop for developers

Connectivity - BLE

Whatrsquos new in lollipop

startAdvertising() + AdvertiseCallback

Advertise yourself

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 126: Android lollipop for developers

Connectivity - BLE

Whatrsquos new in lollipop

ScanFilter + startScan() + ScanCallback

Search for others

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 127: Android lollipop for developers

Connectivity - NFC

Whatrsquos new in lollipop

Concept

Less hassle more punch

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 128: Android lollipop for developers

Connectivity - NFC

Whatrsquos new in lollipop

invokeBeam()

Beam called no tap required

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 129: Android lollipop for developers

Connectivity - NFC

Whatrsquos new in lollipop

createTextRecord()

Create an NDEF record with UTF-8

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 130: Android lollipop for developers

Connectivity - NFC

Whatrsquos new in lollipop

registerAidsForService() +

setPreferredService()

Register an AID (NFC app ID) dynamically

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 131: Android lollipop for developers

Printing frameworks

Whatrsquos new in lollipop

Concept better enterprise

capabilities

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 132: Android lollipop for developers

Printing frameworks

Whatrsquos new in lollipop

Render PDF as bitmap with

PdfRenderer

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 133: Android lollipop for developers

Developer perks

Whatrsquos new in lollipop

A few updates for testing statistics

and accessibility

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 134: Android lollipop for developers

App usage stats

Whatrsquos new in lollipop

Concept

Knowledge is power

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 135: Android lollipop for developers

App usage stats

Whatrsquos new in lollipop

androidpermissionPACKAGE_USAGE_STA

TS

Last usage

total uptime

Last time in foreground

Last config change

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 136: Android lollipop for developers

Testing

Whatrsquos new in lollipop

Concept

Testing makes perfect

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 137: Android lollipop for developers

Testing

Whatrsquos new in lollipop

getWindowAnimationFrameStats()

getWindowContentFrameStats()

frame statistics for instrumentation tests

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 138: Android lollipop for developers

Testing

Whatrsquos new in lollipop

executeShellCommand()

adb for instrumentation tests

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 139: Android lollipop for developers

Accessibility

Whatrsquos new in lollipop

Concept

More clientshellip more money

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 140: Android lollipop for developers

Accessibility - details

Whatrsquos new in lollipop

UiAutomatorgetWindows()

Details about what the user ldquoseesrdquo

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 141: Android lollipop for developers

Accessibility - actions

Whatrsquos new in lollipop

AccessibilityNodeInfoAccessibilityAction

actions (custom and standard) to be defined

to take place on AccessibilityNodeInfo

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 142: Android lollipop for developers

Accessibility - voice

Whatrsquos new in lollipop

New Voice class with locale specific

profiles for better voice recognition

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 143: Android lollipop for developers

A lot is different

Key points

Hybrid apps - what when and why

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 144: Android lollipop for developers

ldquoWe Should Be Building Great Things

Things That Donrsquot yet Existrdquo

I hope you liked it

by Royi Benyossef

Thank you for listening

Page 145: Android lollipop for developers

I hope you liked it

by Royi Benyossef

Thank you for listening