Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nougatty Android

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Nougatty Android

Slide from my talk at GDG New Delhi January 2017 event on codelab on Android N latest features
#AndroidDev #AndroidN

Avatar for Kshitij Aggarwal

Kshitij Aggarwal

January 24, 2017
Tweet

More Decks by Kshitij Aggarwal

Other Decks in Programming

Transcript

  1. What’s new anyways…?? - Very difficult to pronounce name -

    Multi-Window Support - Quick Settings Tiles - App Shortcuts - … many more
  2. Multi Window Support • Target API 24 & above •

    No change in activity lifecycle • Activity are paused when they lose focus even if they are visible in multi-window mode • System cannot resize fix orientation apps • Fullscreen activities cannot hide status bar in multi-window mode
  3. Pro Tips: Multi Window Support • Do not use Application

    Context for inflater and resource retrieval. Since it's not aware of the activity level multi-window state and will load the wrong resource. • Activities which can be launched from outside the current app, should always support multi-window mode. Otherwise you might be breaking another apps screen flow.
  4. Quick Settings Tile • Moto: Urgency + Frequency • Target

    API 25+ • Tiles work via TileService. This is a bound service and lifecycle is controlled by the system. • It can: ◦ Launch Activities ◦ Run background operations ◦ Show dialogs
  5. App Shortcuts • API level 25 or more • 2

    types of shortcuts ◦ Static Shortcuts ◦ Dynamic Shortcuts • Static Shortcuts are packaged with the APK and can only be updated by an App Update • Dynamic Shortcuts are published at runtime and can be easily added, removed or updated • Max 5 shortcuts at any given time
  6. Pro Tip: App Shortcuts • Static Shortcut values have to

    be defined in strings.xml • android:targetPackage should always be equal to your applicationId