Introducing Android P

Introducing Android P

3295d80faee461db1093982361256fe4?s=128

Panini

May 08, 2018
Tweet

Transcript

  1. Introducing Android P Google I/O Extended Tokyo 2018

  2. About Me • Matthew Vern / Panini • Twitter: @callipan

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

    Github: panpanini • Mercari, Inc • Android Engineer (US) • Kotlin可愛い • kotlin@kawaii.com
  4. Android P

  5. 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
  6. 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...
  7. Display Cutout

  8. Display cutout For devices like Essential Phone, or iPhone X

    which have a cutout in the display (for camera, etc).
  9. Display cutout Tall Wide Narrow None

  10. Display cutout • Clock has moved • Notifications only show

    on the left • Limited space (Tall only shows 4)
  11. Material Design 2

  12. Notifications • Images in messaging notifications

  13. Notifications • Images in messaging notifications • Messaging notifications now

    take a Person object for sender instead of CharSequence
  14. Activity transitions • Transitions have a new animation • Slide

    up without fadeout
  15. App transitions • Transitions have a new animation • Slide

    in left/right
  16. Gesture navigation • Accidentally leaked by Google • Looks similar

    to iPhone X navigation
  17. Gesture navigation • Another leak?!?

  18. ImageDecoder

  19. ImageDecoder • More powerful than BitmapFactory • Decode into Bitmap

    or Drawable • setResize(width, height) • setCrop(rect) • OnHeaderDecodedListener
  20. OnHeaderDecodedListener • Callback when image header decoded • Returns ImageInfo

    ◦ getMimeType() ◦ getSize() ◦ isAnimated()
  21. OnPartialImageListener • Callback on failed decode • error: Int •

    Return false to not throw exception
  22. 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
  23. ImageDecoder • Support Library?

  24. ImageDecoder • Support Library? • Uses Native code, so unlikely.

    ◦ Can only use ImageDecoder on minSdkVersion 28
  25. ImageDecoder • Support Library? • Uses Native code, so unlikely.

    ◦ Can only use ImageDecoder on minSdkVersion 28 •
  26. Others

  27. Multi-camera API • Multiple cameras at the same time •

    ~360 camera emulation? • ???
  28. 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
  29. Android Things • Finalized APIs • Looks like it will

    get a 1.0 release this year
  30. 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
  31. 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?
  32. Flutter • Many sessions for it announced now, so possibly

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

    something big • Flutter Beta 3 announced this morning • ??? • Flutter Meetup Tokyo #2 (5/31)
  34. Summary

  35. Summary • Developer Preview 2 release • Display Cutout •

    Material Design 2 • Gesture Navigation • ImageDecoder • Slices (Google Assistant UI?)
  36. 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/