Slide 1

Slide 1 text

Introducing Android P Google I/O Extended Tokyo 2018

Slide 2

Slide 2 text

About Me ● Matthew Vern / Panini ● Twitter: @callipan Github: panpanini ● Mercari, Inc ● Android Engineer (US) ● Kotlin可愛い

Slide 3

Slide 3 text

About Me ● Matthew Vern / Panini ● Twitter: @callipan Github: panpanini ● Mercari, Inc ● Android Engineer (US) ● Kotlin可愛い ● [email protected]

Slide 4

Slide 4 text

Android P

Slide 5

Slide 5 text

Android P ● Developer Preview 1 ○ Released March 7 2018 ○ Initial preview, so not yet stable ○ Only available by manually flashing your device, or emulator ● Developer Preview 2 ○ Most likely released at Google I/O 2018 ○ More stable, will be available as OTA update

Slide 6

Slide 6 text

Features ● Display Cutout ● JobScheduler data cost ● Multi-camera ● Indoor Positioning ● Image Decoder ● HDR VP9 Video & HEIF ● Neural Networks 1.1 ● Notification improvements ● Rotation lock ● etc...

Slide 7

Slide 7 text

Display Cutout

Slide 8

Slide 8 text

Display cutout For devices like Essential Phone, or iPhone X which have a cutout in the display (for camera, etc).

Slide 9

Slide 9 text

Display cutout Tall Wide Narrow None

Slide 10

Slide 10 text

Display cutout ● Clock has moved ● Notifications only show on the left ● Limited space (Tall only shows 4)

Slide 11

Slide 11 text

Material Design 2

Slide 12

Slide 12 text

Notifications ● Images in messaging notifications

Slide 13

Slide 13 text

Notifications ● Images in messaging notifications ● Messaging notifications now take a Person object for sender instead of CharSequence

Slide 14

Slide 14 text

Activity transitions ● Transitions have a new animation ● Slide up without fadeout

Slide 15

Slide 15 text

App transitions ● Transitions have a new animation ● Slide in left/right

Slide 16

Slide 16 text

Gesture navigation ● Accidentally leaked by Google ● Looks similar to iPhone X navigation

Slide 17

Slide 17 text

Gesture navigation ● Another leak?!?

Slide 18

Slide 18 text

ImageDecoder

Slide 19

Slide 19 text

ImageDecoder ● More powerful than BitmapFactory ● Decode into Bitmap or Drawable ● setResize(width, height) ● setCrop(rect) ● OnHeaderDecodedListener

Slide 20

Slide 20 text

OnHeaderDecodedListener ● Callback when image header decoded ● Returns ImageInfo ○ getMimeType() ○ getSize() ○ isAnimated()

Slide 21

Slide 21 text

OnPartialImageListener ● Callback on failed decode ● error: Int ● Return false to not throw exception

Slide 22

Slide 22 text

PostProcessor ● Called after image decoded ○ int onPostProcess(Canvas canvas) ● Can use this to apply rounded corners etc ● Should return if the image is translucent ○ UNKNOWN - This process didn’t add translucent pixels ○ TRANSLUCENT - This process added translucent pixels ○ OPAQUE - This process made the entire image opaque ● Returning any other status code will result in IllegalArgumentException

Slide 23

Slide 23 text

ImageDecoder ● Support Library?

Slide 24

Slide 24 text

ImageDecoder ● Support Library? ● Uses Native code, so unlikely. ○ Can only use ImageDecoder on minSdkVersion 28

Slide 25

Slide 25 text

ImageDecoder ● Support Library? ● Uses Native code, so unlikely. ○ Can only use ImageDecoder on minSdkVersion 28 ●

Slide 26

Slide 26 text

Others

Slide 27

Slide 27 text

Multi-camera API ● Multiple cameras at the same time ● ~360 camera emulation? ● ???

Slide 28

Slide 28 text

Indoor positioning API ● Positioning using Wifi ● Requires hardware support (IEEE 802.11mc) ○ Both on device and access point (AP) ● Can use to triangulate location indoors

Slide 29

Slide 29 text

Android Things ● Finalized APIs ● Looks like it will get a 1.0 release this year

Slide 30

Slide 30 text

Android Things ● Finalized APIs ● Looks like it will get a 1.0 release this year ● 1.0 was released this morning ● https://android-developers.googleblog.com/2018/05/say-hello-to-android-thing s-10.html

Slide 31

Slide 31 text

Slice ● A slice is a piece of app content and actions that can be surfaced outside of the app. ● Similar to RemoteView ● For Google Assistant?

Slide 32

Slide 32 text

Flutter ● Many sessions for it announced now, so possibly something big ● ??? ● Flutter Meetup Tokyo #2 (5/31)

Slide 33

Slide 33 text

Flutter ● Many sessions for it announced now, so possibly something big ● Flutter Beta 3 announced this morning ● ??? ● Flutter Meetup Tokyo #2 (5/31)

Slide 34

Slide 34 text

Summary

Slide 35

Slide 35 text

Summary ● Developer Preview 2 release ● Display Cutout ● Material Design 2 ● Gesture Navigation ● ImageDecoder ● Slices (Google Assistant UI?)

Slide 36

Slide 36 text

Appendix ● https://developer.android.com/preview/features ● https://arstechnica.com/gadgets/2018/04/google-shows-off-android-ps-gesture -navigation-quickly-deletes-image/ ● https://blog.stylingandroid.com/category/imagedecoder/ ● https://blog.novoda.com/android-p-slices-missing-documentation-part-1/