$30 off During Our Annual Pro Sale. View Details »

Android Instant Apps - An Introduction

Android Instant Apps - An Introduction

This talk covers a very basic introduction about Android Instant Apps, focusing more on the experience and its product side and less on its technical challenges.

It tries to overview how are they implemented, why are they important and which use cases should be covered.

Filipe Mendes

January 10, 2018
Tweet

More Decks by Filipe Mendes

Other Decks in Technology

Transcript

  1. Android Instant apps
    An introduction
    @fmendes6

    View Slide

  2. Instant apps are a…
    Modularization and Optimization

    Problem
    Plus configurations

    View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. “It can take less than 

    a day of work to 

    get set up”

    View Slide

  7. View Slide

  8. “Depending on

    how your app 

    is built”

    View Slide

  9. View Slide

  10. View Slide

  11. I went on a
    mission to try it…

    View Slide

  12. …but it didn’t
    work.

    View Slide

  13. 1 2 3

    View Slide

  14. 1 2 3

    View Slide

  15. 1 2 3

    View Slide

  16. Still didn’t work.

    View Slide

  17. View Slide

  18. First it did.

    View Slide

  19. 1 2

    View Slide

  20. 1 2

    View Slide

  21. Then it didn’t
    anymore.

    View Slide

  22. 1 2 3

    View Slide

  23. 1 2 3

    View Slide

  24. 1 2 3

    View Slide

  25. So I tried outside
    the browser.

    View Slide

  26. View Slide

  27. And it worked
    always.

    View Slide

  28. View Slide

  29. What is an
    instant app?

    View Slide

  30. “…enables native Android
    applications to run in response to
    launching a URL, without installing
    the app.”

    View Slide

  31. Support ?
    2016 2018 (?) 2017

    View Slide

  32. Why do we need
    an instant app?

    View Slide

  33. Vimeo
    increased session 

    duration by 130%
    Jet
    increased conversion

    rate by 27%
    NY Crosswords
    2x number of sessions

    per user

    View Slide

  34. dotloop
    62% increase in users

    who sign a document
    Onefootball
    # users who read news 

    and share content 

    increased 55%
    realtor.com
    2x number of leads 

    per property listing 

    details pageview.

    View Slide

  35. How does it
    work?

    View Slide


  36. View Slide


  37. feature.apk

    View Slide


  38. “nope”

    View Slide


  39. “nope”
    Broadcast

    Intent

    Handle
    URL

    View Slide

  40. How do we
    implement an
    instant app?

    View Slide

  41. “Depending on

    how your app 

    is built”

    View Slide

  42. I - Android Project
    Topeka App
    Phone & Tablet Module

    View Slide

  43. II - Splitting App & Base
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature

    View Slide

  44. II - Adding Instant App
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature
    Topeka-InstantApp
    Instant App

    View Slide

  45. III - Defining App Links

    View Slide

  46. III - Defining App Links

    View Slide

  47. III - Defining App Links

    View Slide

  48. III - Defining App Links
    myshoppingapp://products/600613
    https://.com/products/600613

    View Slide

  49. Build & Run

    View Slide

  50. II - Adding Instant App
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature
    Topeka-InstantApp
    Instant App

    View Slide

  51. IV - Multi-Feature
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature
    Topeka-InstantApp
    Instant App Feature #1 Feature #2

    View Slide

  52. IV - Multi-Feature
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature
    Topeka-InstantApp
    Instant App Feature #1 Feature #2

    View Slide

  53. IV - Multi-Feature
    Topeka APP
    Phone & Tablet
    Topeka-Base
    Feature
    Topeka-InstantApp
    Instant App Feature #1 Feature #2

    View Slide

  54. Recap

    View Slide

  55. Application Module
    .aar .aar
    .apk
    .aar

    View Slide

  56. Instant App Module
    .apk .apk
    .zip
    .apk

    View Slide

  57. What use cases
    should an instant
    app cover?

    View Slide

  58. Use Cases
    “Instant Apps are driven by actions and
    should be available to users right when
    they are needed.”

    View Slide

  59. Use Cases

    View Slide

  60. Use Cases

    “Instant Apps should focus primarily on
    helping users complete whatever task
    they set out to do with as little friction as
    possible, not drive full app installs.”

    View Slide

  61. However…

    View Slide

  62. Unsupported Features
    • Long-running background services
    • Manifest-registered broadcast receivers
    • Externally accessible content providers
    • Re-engagement notifications

    View Slide

  63. Security?

    View Slide

  64. View Slide

  65. Security
    • During development you need to prove that you own the
    domain through some .json configuration files.
    • The Instant App has limited access to handheld device-spec
    info, fe. MMI, Mac address, etc.
    • Access is denied automatically, so even as a developer, you
    cannot get access to this data.
    • However, you will have full access to Android ID and Ad ID.

    View Slide

  66. What about 

    UI/UX?

    View Slide

  67. Before and After

    View Slide

  68. No additional Splash Screens

    View Slide

  69. Allow task completion

    View Slide

  70. Publishing?

    View Slide

  71. Publishing
    • Code signing
    • Well formatted Intent Filters for proper deep linking
    • Each feature module plus the base module needs to be below
    4mb.

    View Slide

  72. APK size

    View Slide

  73. APK Size Reduction
    • Refactor the codebase
    • Remove unused resources
    • Use more efficient file formats like WebP.
    • Download assets at runtime, if it makes sense and if possible.
    • Review internal/external libraries

    View Slide

  74. But there is
    more…

    View Slide

  75. Other concerns
    • The user state should be kept after the app gets installed.
    • Proguard may need to be reconfigured.
    • Injected dependencies may need some adjustments.
    • It can be challenging to move from a custom layered
    architecture to an Instant App ready architecture.

    View Slide

  76. User Story

    View Slide

  77. “Reserve time for developing the instant app and stop developing
    features during this time. This makes refactoring and moving code a
    lot easier. It took us about 4–5 weeks for a first releasable version.”

    View Slide

  78. “It can take less than 

    a day of work to 

    get set up”

    View Slide

  79. View Slide

  80. Let’s discuss
    some possible
    conversions

    View Slide

  81. View Slide

  82. 1 2

    View Slide

  83. 1 2

    View Slide

  84. View Slide

  85. 1 2

    View Slide

  86. 1 2

    View Slide

  87. View Slide

  88. It’s not on Google Play :(

    View Slide

  89. Instant apps are a…
    Modularization and Optimization

    Problem
    Plus configurations

    View Slide

  90. Thank you!
    Questions?
    @fmendes6

    View Slide

  91. References
    General
    • https://developer.android.com/topic/instant-apps/guides/index.html
    • https://medium.com/inloop/android-instant-apps-part-2-7bebb74fa7bb
    • https://techbeacon.com/how-deploy-android-instant-apps-web-apps-take-
    native-apps
    • https://speakerdeck.com/cyrilmottier/introduction-to-android-instant-apps
    • https://developer.android.com/topic/instant-apps/overview.html
    • https://www.youtube.com/watch?v=cosqlfqrpFA
    • https://developer.android.com/stories/index.html
    • https://developer.android.com/topic/instant-apps/ux-best-practices.html
    Reducing APK size
    • https://android-developers.googleblog.com/2017/08/android-instant-apps-
    best-practices-for.html
    • https://speakerdeck.com/pareshmayani/generating-efficient-apk-by-reducing-
    size-and-improving-performance
    • https://developer.android.com/topic/instant-apps/prepare.html
    • https://developer.android.com/topic/performance/reduce-apk-size.html

    View Slide

  92. References
    Developer Stories
    • http://rea.tech/building-the-realestate-com-au-android-instant-app/
    • https://willowtreeapps.com/ideas/an-introduction-to-android-instant-apps
    • https://medium.com/jet-stories/make-your-app-instant-33855ab5d02b
    • https://medium.com/vimeo-engineering-blog/vimeo-android-instant-
    apps-2f8b1e94760c
    • https://tech.ticketmaster.com/2017/05/18/ticketmaster-demonstrates-cutting-
    edge-android-instant-apps-technology-at-google-io/
    • https://medium.com/nos-digital/some-useful-insights-on-instant-
    apps-67cc7d177695
    • http://tech.domain.com.au/2017/06/making-the-domain-android-app-instant-
    ⚡/
    • https://tech.buzzfeed.com/from-westinghouse-to-android-instant-
    apps-60fbfaca4ebe
    Codelab
    • codelabs.developers.google.com/codelabs/android-instant-apps

    Cover
    • https://goo.gl/m4ovQ4

    View Slide