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

DevNexus 2017: What's New In Android

DevNexus 2017: What's New In Android

Android N, now known as Nougat, also known as version 7, also known as API 24 was announced last Summer at Google IO 2016. Drop in to hear a rundown of all the new and exciting features that you as a developer can take advantage of in the new Nougat release as well as items you need to prepare for. From the new split window feature to Java 8 feature support, there are some exciting topics to cover. We will also cover the latest in build tools, Android Studio, Jack and Jill, and app compat library updates. This will speak to developers as well as mobile management.

Douglas Knudsen

March 20, 2017
Tweet

More Decks by Douglas Knudsen

Other Decks in Technology

Transcript

  1. WHATS NEW IN ANDROID? AGENDA ▸ What this is and

    not ▸ Nougat! ▸ Developer Tools
  2. WHATS NEW IN ANDROID? MULTI WINDOW ▸ Apps can opt

    in/out and set minimum sizes ▸ Apps should ‘just work’ since we are all pros :) ▸ Apps can open new activities in multi-window ▸ Drag and drop API is updated to allow functionality across windows ▸ Developers need make use of onStart() and onStop() since app can still be visible after onPause() fires ▸ Also note entering, exiting, and resizing causes a configuration change
  3. WHATS NEW IN ANDROID? MULTI WINDOW ▸ For API <

    24, if no fixed orientation, your app is multi-window enabled ▸ Can set at Application or Activity level, default is TRUE! android:resizeableActivity ▸ Use android:supportsPictureInPicture for LeanBack APIs ▸ isInMultiWindowMode() and onMultiWindowModeChanged() is available ▸ similar for LeanBack APIs
  4. WHATS NEW IN ANDROID? MULTI WINDOW <activity android:name=".KoolActivity"> <layout android:defaultHeight="500dp"

    android:defaultWidth="600dp" android:gravity=“top|end” android:minHeight=“450dp” android:minWidth=“300dp” android:resizeableActivity=“true” /> </activity>
  5. WHATS NEW IN ANDROID? MULTI LOCALE ▸ Users can choose

    multiple locales on device ▸ Prioritized ▸ Gives multi-lingual users better chance at using your app
  6. WHATS NEW IN ANDROID? MULTI LOCALE ▸ Developers have new

    APIs in LocaleList such as getDefault() ▸ Developers can use this to customize UIs, such as providing data results in two languages or not offering to translate a known language
  7. WHATS NEW IN ANDROID? MULTI LOCALE ▸ Developers should prefer

    formatters even for static content. ▸ format(locale, "Choose a %d-digit PIN", 4) ▸ Android 7.0 and higher includes support for 27 Arabic locales!!!!
  8. WHATS NEW IN ANDROID? DOZE ALL THE TIME ▸ Introduced

    in Android M aka 6.0 aka Marshmallow aka API 23 ▸ Now full time, screen off for a time ▸ If stationary for a time, goes full on
  9. WHATS NEW IN ANDROID? DOZE ALL THE TIME ▸ When

    full doze is full on, wake locks ignored, no JobScheduler, and no AlarmManager alarms. ( setAlarmClock() fires normally ), no GPS or wifi scan ▸ During partial doze, network is restricted and these are all queued
  10. WHATS NEW IN ANDROID? PROJECT SVELTE…RICO ▸ Implicit CONNECTIVITY_ACTION broadcasts

    are not received ▸ Developers can use CONNECTIVITY_CHANGE still ▸ ACTION_NEW_PICTURE and ACTION_NEW_VIDEO are no longer delivered ▸ Developers need to use JobScheduler API. ▸ Future Android SDK may even remove startService()
  11. WHATS NEW IN ANDROID? WORK ▸ Work mode toggle ▸

    VPN stays on ▸ DevicePolicyManager changes ▸ Customized provisioning, get those corporate logos and colors!
  12. WHATS NEW IN ANDROID? JAVA 8 ▸ Default interface methods

    public interface Fruity { default void pickMe(){ System.out.println("Calling Fruity.pickMe())"); } } public class Zurple implements Fruity {} Zurple zurple = new Zurple(); zurple.pickMe(); //Calling Fruity.pickMe()
  13. WHATS NEW IN ANDROID? JAVA 8 ▸ Lamba and Method

    expressions! ( < 24 ) TextView textView = (TextView) findViewById(R.id.text_view); textView.setOnLongClickListener(v -> System.out.println("Long Click")); ▸ Repeatable Annotations, auto-containers @Custom(foo = 45) @Custom(foo = 99, goo = 42) public Goo foo; ▸ Note that the new fancy Date Time API is not present
  14. WHATS NEW IN ANDROID? JAVA 8 ▸ java.util.function and java.util.stream

    myList.stream() .filter(s -s.startsWith(“c”)) .map(String::toUpperCase) .sorted() .forEach(System.out::println); ▸ ICU4J (partially), even so, helps APK size greatly ▸ All this requires Jack
  15. WHATS NEW IN ANDROID? JACK AND JILL ▸ Jack is

    the new compiler toolchain - Java Android Compiler Kit, default since M ▸ Replaces javac, jarjar, dx, and ProGuard ▸ Faster and OSS and Java 8 ▸ Jill moves existing jar files into the new format for Jack - Java Intermediate Library Linker
  16. WHATS NEW IN ANDROID? JIT, JIT, THE JIT IS BACK

    ▸ JIT is back and mixed in with AOT inside ART ▸ Remember AOT? note seamless upgrades!
  17. WHATS NEW IN ANDROID? APP SHORTCUTS ▸ API 25! yes,

    7.1…Nougat.1..2? ▸ Long press = deep links ▸ Static or dynamic
  18. WHATS NEW IN ANDROID? EMOJI!!!!!!! ▸ eemohjeeeeee! ▸ Unicode 9

    support ▸ Image keyboard support updates ▸ Skin tone choice support
  19. WHATS NEW IN ANDROID? NOTIFICATIONS ▸ Updated…again ▸ Actionable…direct reply

    RemoteInput API ▸ Bundled…gather by topic ▸ Custom views…bit more control ▸ Peeking…into groups
  20. WHATS NEW IN ANDROID? QUICK SETTINGS ▸ Google follows device

    manufactures ▸ Exposed to developers! ▸ Use for frequently used actions in your app ▸ TileService
  21. WHATS NEW IN ANDROID? QUICK SETTINGS <SERVICE ANDROID:NAME=".MYTILESERVICE" ANDROID:ICON="@DRAWABLE/MY_TILE_ICON" ANDROID:LABEL=“@STRING/MY_TILE_LABEL"

    ANDROID:PERMISSION="ANDROID.PERMISSION.BIND_QUICK_SE TTINGS_TILE"> <INTENT-FILTER> <ACTION ANDROID:NAME="ANDROID.SERVICE.QUICKSETTINGS.ACTION. QS_TILE" /> </INTENT-FILTER> </SERVICE>
  22. WHATS NEW IN ANDROID? INSTANT APPS ▸ Just Google it!

    ▸ And they will run it! ▸ No extra code ▸ Provided your code is modular
  23. WHATS NEW IN ANDROID? INSTANT APPS REALITY ▸ Relies on

    App Links ▸ Can not open Activities direct ▸ Activities must be URL addressable ▸ Each ‘module’ must be 4MB or less in APK size ▸ If a login is needed, have to use Smart Lock ▸ You will have access to Advertising ID ▸ https://developer.android.com/topic/instant-apps/prepare.html
  24. WHATS NEW IN ANDROID? GRAPHICS ▸ New Vulcan Graphics API

    ▸ Implementation of the Khronos Group API ▸ low-overhead, high performance, 3-D
  25. WHATS NEW IN ANDROID? ANDROID STUDIO ▸ 2.2 is here,

    its a big dot! ▸ Layout Editor and Inspector ▸ Constraint Layout ▸ Better C++/NDK support ▸ Last IntelliJ base ▸ PSD import to Vector Drawables ▸ 2.3 is near! instant run updates, new build cache, app link assistant
  26. WHATS NEW IN ANDROID? CIRCLES! ▸ Circular launcher icons ▸

    New tool for these too ▸ Having a tool is so official
  27. WHATS NEW IN ANDROID? ANDROID STUDIO ▸ Java 8 support,

    actually ships with Java 8 runtime ▸ Updated emulators…finally fast ▸ More instant run improvements ▸ Espresso Test Recorder
  28. WHATS NEW IN ANDROID? CONSTRAINT LAYOUTS ▸ Responsive UI layouts

    in a ‘flat’ setup ▸ New layout engine and tooling in Android Studio 2.2 ▸ Similar to RelativeLayout, but more goodies ▸ compile ‘com.android.support.constraint:constraint- layout:1.0.0’ ▸ Backward compatible to 2.3! Gingerbread! ( But hey, who cares! Gingy has been cut! ) ▸ JUST hit 1.0 milestone 2/22!
  29. WHATS NEW IN ANDROID? CONSTRAINT LAYOUTS ▸ go to demo

    ▸ demo layout editor, constraints, and espresso test recorder ▸ espresso video back up plan https://youtu.be/ 1GOnfXdWvTM?t=27
  30. WHATS NEW IN ANDROID? APP COMPAT APIS ▸ Password visibility

    toggle ▸ Custom Tabs support for Instant Apps ( Inception! ) ▸ New getDrawable() version to load Vector Drawables ▸ A new DiffUtil to determine differences in Collections and notify UIs
  31. WHATS NEW IN ANDROID? APP COMPAT V4 ▸ NotificationCompat.MessagingStyle For

    those fancy threaded looking notifications ▸ NotificationManagerCompat.areNotificationsEnabl ed() and getImportance() Now we can tell if the user turned off notifications for our app. Also, is this important to the user? ▸ Library split! Much like v7 and others, can use a subset now ▸ Drop support of API 9 and lower. No more Froyo, Ginger, Eclair, etc
  32. WHATS NEW IN ANDROID? APP COMPAT V7 ▸ Vector support

    in DrawableContainers…so StateListDrawables ▸ Night Mode! Day and Night themes, can use GPS to auto- update these ▸ VectorDrawableCompat and AnimatedVectorDrawableCompat added, yes, animated vectors Victor!
  33. WHATS NEW IN ANDROID? APP COMPAT MATERIAL ▸ Bottom Sheets!

    ▸ Persistent ▸ Min height, yet draggable
  34. WHATS NEW IN ANDROID? RESOURCES ▸ https://developers.googleblog.com/ ▸ Android Dialogs

    https://www.youtube.com/channel/ UCMEmNnHT69aZuaOrE-dF6ug ▸ Fragmented Podcast http://fragmentedpodcast.com/ ▸ Android Backstage http://androidbackstage.blogspot.com/ ▸ https://medium.com/exploring-android/exploring-the-new- android-constraintlayout-eed37fe8d8f1#.x6rtenlov ▸ SLACK! Android United, etc…