Slide 1

Slide 1 text

Android Instant apps An introduction @fmendes6

Slide 2

Slide 2 text

Instant apps are a… Modularization and Optimization
 Problem Plus configurations

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

“It can take less than 
 a day of work to 
 get set up”

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

“Depending on
 how your app 
 is built”

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

I went on a mission to try it…

Slide 12

Slide 12 text

…but it didn’t work.

Slide 13

Slide 13 text

1 2 3

Slide 14

Slide 14 text

1 2 3

Slide 15

Slide 15 text

1 2 3

Slide 16

Slide 16 text

Still didn’t work.

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

First it did.

Slide 19

Slide 19 text

1 2

Slide 20

Slide 20 text

1 2

Slide 21

Slide 21 text

Then it didn’t anymore.

Slide 22

Slide 22 text

1 2 3

Slide 23

Slide 23 text

1 2 3

Slide 24

Slide 24 text

1 2 3

Slide 25

Slide 25 text

So I tried outside the browser.

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

And it worked always.

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

What is an instant app?

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

Support ? 2016 2018 (?) 2017

Slide 32

Slide 32 text

Why do we need an instant app?

Slide 33

Slide 33 text

Vimeo increased session 
 duration by 130% Jet increased conversion
 rate by 27% NY Crosswords 2x number of sessions
 per user

Slide 34

Slide 34 text

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.

Slide 35

Slide 35 text

How does it work?

Slide 36

Slide 36 text

Slide 37

Slide 37 text

feature.apk

Slide 38

Slide 38 text

“nope”

Slide 39

Slide 39 text

“nope” Broadcast
 Intent
 Handle URL

Slide 40

Slide 40 text

How do we implement an instant app?

Slide 41

Slide 41 text

“Depending on
 how your app 
 is built”

Slide 42

Slide 42 text

I - Android Project Topeka App Phone & Tablet Module

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

III - Defining App Links

Slide 46

Slide 46 text

III - Defining App Links

Slide 47

Slide 47 text

III - Defining App Links

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

Build & Run

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

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

Slide 54

Slide 54 text

Recap

Slide 55

Slide 55 text

Application Module .aar .aar .apk .aar

Slide 56

Slide 56 text

Instant App Module .apk .apk .zip .apk

Slide 57

Slide 57 text

What use cases should an instant app cover?

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

Use Cases

Slide 60

Slide 60 text

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.”

Slide 61

Slide 61 text

However…

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

Security?

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

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.

Slide 66

Slide 66 text

What about 
 UI/UX?

Slide 67

Slide 67 text

Before and After

Slide 68

Slide 68 text

No additional Splash Screens

Slide 69

Slide 69 text

Allow task completion

Slide 70

Slide 70 text

Publishing?

Slide 71

Slide 71 text

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

Slide 72

Slide 72 text

APK size

Slide 73

Slide 73 text

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

Slide 74

Slide 74 text

But there is more…

Slide 75

Slide 75 text

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.

Slide 76

Slide 76 text

User Story

Slide 77

Slide 77 text

“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.”

Slide 78

Slide 78 text

“It can take less than 
 a day of work to 
 get set up”

Slide 79

Slide 79 text

No content

Slide 80

Slide 80 text

Let’s discuss some possible conversions

Slide 81

Slide 81 text

No content

Slide 82

Slide 82 text

1 2

Slide 83

Slide 83 text

1 2

Slide 84

Slide 84 text

No content

Slide 85

Slide 85 text

1 2

Slide 86

Slide 86 text

1 2

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

It’s not on Google Play :(

Slide 89

Slide 89 text

Instant apps are a… Modularization and Optimization
 Problem Plus configurations

Slide 90

Slide 90 text

Thank you! Questions? @fmendes6

Slide 91

Slide 91 text

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

Slide 92

Slide 92 text

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