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

Instant app: Why you must think about it

Instant app: Why you must think about it

An overview of instant apps, a feature recently introduced by Google and little explored nowadays.
We will show some use cases of how and when to use it.

Avatar for Tomaz Silva

Tomaz Silva

August 25, 2017

More Decks by Tomaz Silva

Other Decks in Programming

Transcript

  1. 1 Instant Apps Why you must think about it Tomaz

    Silva, Vinicius Suzuki / August, 2017
  2. Contents • What are Instant apps • How it works

    • Restrictions • Who is using it • Why use it • Designing your app ◦ Where it does not work ◦ Choose a case ◦ What is your goal ◦ Guides principles ◦ Hands on Our today's agenda
  3. Why use it • 500 million devices now supported for

    Android Instant Apps • Reduce install friction • App not installed • Full Android native app experience (bt, gps, ux) • New use cases
  4. What are Instant Apps • First introduced in Google I/O

    2016 (in 2017 preview) • Android Instant Apps will work with devices running Android 5.0 (API 21) and +. • Run without installation • Provide users all the rich experience of a native app in a tap of url • "Apps as features"
  5. How it works • Tapping on a URL will give

    users access to a full-fledged Android app without the need to install it first. • Android Instant Apps not only works with a URL, but also NFC. • Once the Instant App loads up, you can use it just like you would with any other app that’s been downloaded via the Google Play Store. I
  6. Who is using • Vimeo • Jet • Dotlop •

    Onefootball • Realtor • NYTimes Crossword Use cases by Google
  7. Where it does not works • Your app rely on

    background services • Your app has a lot of large files (eg. mp3, images, etc) • Your App uses notifications • Your app is paid • Your app is designed for families
  8. Choose a use case • Focus on exactly what you

    want your user do • Don't try to convert the whole app to an instant app, focus on the most used feature
  9. What is your goal? • Conversion ◦ Focus on current

    user database(simplify use of the app for current users) ◦ Drive users into your flagship feature • Reach ◦ Try add new user to your database ◦ Focus on URL-based growth opportunities (e.g using deep links, share) • New use cases ◦ E.g companion apps, location triggered use case, NFC
  10. Guiding principle • One app, one user experience ◦ Two

    modes, before and after installation • Modularise you code
  11. How to implement InstantApps • Design for multiple entry points

    ◦ Support Android App links • Android Instant Apps uses URLs for all navigation ◦ Each feature need to be structured into URL-addressable modules that are under 4MB in size(Feature + Base Feature) ◦ After the InstantApp launches additional data can be downloaded ◦ An instant app cannot launch an activity, it must use URL that corresponds to the other other feature's entry-point activity
  12. How to implement InstantApps • Remove any unneeded bulk from

    your app • Implement runtime permissions from Android 6.0 • Using Google APIs simplifying app use - Google payment, Smart lock
  13. Make easy for user install your app • New Play

    Install API • Two ways to install - explicit and implicit
  14. Restrictions (⅓ Architecture) • You can not have only an

    instant app version of your app, you need to have an installable version also • Can't use background services • Can't do background notifications • Can't access unique device identifiers(e.g. IMEI, MAC address)
  15. • InstantApps just can use these permissions ◦ BILLING ◦

    ACCESS_COARSE_LOCATION ◦ ACCESS_FINE_LOCATION ◦ ACCESS_NETWORK_STATE ◦ CAMERA ◦ INSTANT_APP_FOREGROUND_SERVI CE only in Android O. ◦ INTERNET ◦ READ_PHONE_NUMBERS only in Android O. ◦ RECORD_AUDIO ◦ VIBRATE Restrictions (⅔ Android) App building restrictions
  16. • All network traffic from inside the instant app must

    use HTTPS • Apps that have a login experience in the instant app must implement Smart Lock • Access external storage on the device, but your app can temporarily use internal storage private to the app • Discover the list of installed apps on the device, unless the installed apps have made themselves discoverable to instant apps Restrictions ( 3/3 Technical)
  17. Requirements • Android Studio version 3.0 or later • install

    the Instant Apps Development SDK. • JDK 1.8 • Android SDK 6.0+ • Android SDK Build Tools 26.x or later • Android SDK Tools 25.x or later • Android SDK Platform Tools 25.x or later • Android Support Library (latest) • Android Repository (latest) System requirements
  18. Important For deployment, do not forget include it in your

    Manifest: • auto-verify = true ◦ tells Android to automatically verify your App Links • Default-url = "your.default.url"
  19. How to test your links • Using adb • Open

    a link with the URL you want to test ◦ It’s must be a link, it do not work if just paste on the browser
  20. FAQ • Explicit instalation - Do not use any other

    labels like "Get the app," "Install the full app," or "Upgrade." Never use a banner or other ad-like technique for presenting an installation prompt to users. • Don't create any additional splash screens • Module size - The feature Size + Base Feature must have less than 4MB • Each instantApp feature generate an APK and all these files are aggregated in a zip file • You navigate to different activities by launching a URL that corresponds to the desired activity. Given this reason, activities in an instant app need to be URL-addressable
  21. FAQ • Do users need to download the base and

    dependent feature APKs each time they download the same instant app? • When users first download an instant app, they receive the base feature and a dependent feature. ◦ When a second feature or feature APK is requested, the user receives only the feature APK for that feature. The base feature is not re-downloaded in this case.The system can clear the cache of instant apps as needed during garbage collection. If the phone is rebooted, the cache is cleared. If the cache of instant apps is cleared, users must re-download the base feature again.
  22. FAQ • When the user stops interacting with the instant

    app, the instant app process is killed. However the internal storage of the app like SQLite DBs and shared preferences remain. If the device is severely constrained, the instant app might be evicted and its internal storage deleted. In this unlikely event, developers must restore the instant app state from their servers. • Can instant apps launch other apps installed on the user's device? ◦ Instant apps can launch an installed app by firing an implicit intent, but they cannot launch most installed apps using an explicit intent. Installed apps can make themselves available to interact with instant through explicit intents.