Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Make Your App Instant!
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuliya Kaleda
November 05, 2017
Technology
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Make Your App Instant!
Yuliya Kaleda
November 05, 2017
More Decks by Yuliya Kaleda
See All by Yuliya Kaleda
Add Reality to your App with ARCore and Sceneform
yuliyakaleda
0
220
Add Reality to your App with ARCore
yuliyakaleda
2
360
Other Decks in Technology
See All in Technology
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
130
全社に広がるMCPサーバーを、 どう安全に管理するか MCPass開発の舞台裏
mtpooh
3
240
スクラムで身についていた動き方を、XPで捉え直してみた
codmoninc
0
150
Claude Codeの体系的な理解と知識のフック
oikon48
10
6.5k
Digitization部 紹介資料
sansan33
PRO
2
7.8k
When Token Pruning is Worse than Random: Understanding Visual Token Information in VLLMs
sansantech
PRO
0
230
AIエージェントの開発・提供におけるセキュリティリスクの論点と対策
flatt_security
0
260
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
20k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.3k
分割40%キーボードにスムーズに入門するには
hoto17296
1
220
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
3
880
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
230
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Prompt Engineering for Job Search
mfonobong
0
430
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
From π to Pie charts
rasagy
0
350
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
960
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
660
WENDY [Excerpt]
tessaabrams
12
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Transcript
Make Your App Instant! @YuliyaKaleda
Mobile Evolution built-in apps mWeb store apps instant apps
What is Instant Apps?
Best of Two Worlds Instant Apps mWeb native material design
navigation installation space friendly
Technical Overview shared codebase size constraints API level 21 multi-module
URL responsive 4 MB
Under the hood https://jet.com AIA url == web url
AndroidManifest.xml <activity android:name="com.jet.cartlib.activities.CartActivity" android:launchMode="singleTop" android:parentActivityName=".activities.RootActivity" android:windowSoftInputMode="adjustResize|adjustPan"> <intent-filter android:order="2"> <action android:name="android.intent.action.VIEW"
/> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="http" /> <data android:scheme="https" /> <data android:host="www.jet.com" /> <data android:host="jet.com" /> <data android:pathPrefix="/cart" /> </intent-filter> </activity>
Instant Apps Types multi-feature single feature
Single Feature Instant Apps base module app module instant app
module {code}
base/build.gradle apply plugin: 'com.android.feature' apply plugin: 'io.fabric' apply plugin: 'newrelic'
android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName vectorDrawables.useSupportLibrary = true baseFeature true … } dependencies { //lib dependencies api 'com.squareup.picasso:picasso:2.5.2' }
app/build.gradle apply plugin: 'com.android.application' apply plugin: 'io.fabric' apply plugin: 'newrelic'
android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName vectorDrawables.useSupportLibrary = true … } dependencies { implementation project(':baselib') }
instantApp/build.gradle apply plugin: ‘com.android.instantapp' apply plugin: 'io.fabric' apply plugin: 'newrelic'
android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName … } dependencies { implementation project(':baselib') }
Single Feature Instant Apps base module app module instant app
module 4 MB
Multi-Feature Instant Apps app module d { c o }
e feature modules
Multi-Feature Instant Apps PLP product list page PDP product detail
page Cart ODP order detail page
Multi-Feature Instant Apps app module d { c o }
e base module instant app module
base/build.gradle apply plugin: 'com.android.feature' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion
defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion vectorDrawables.useSupportLibrary = true baseFeature true } dependencies { feature project(':plplib') feature project(':pdplib') feature project(':cartlib') feature project(':orderDetailLib') application project(':app') //lib dependencies api 'com.squareup.picasso:picasso:2.5.2' }
feature/build.gradle apply plugin: 'com.android.feature' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion
defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName } dependencies { implementation project(':baselib') }
app/build.gradle apply plugin: 'com.android.application' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion
defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName } dependencies { implementation project(':baselib') implementation project(':plplib') implementation project(':pdplib') implementation project(':cartlib') implementation project(':orderDetailLib') }
instantApp/build.gradle apply plugin: ‘com.android.instantapp' android { compileSdkVersion rootProject.compileSdkVersion buildToolsVersion rootProject.buildToolsVersion
defaultConfig { minSdkVersion rootProject.minSdkVersion targetSdkVersion rootProject.targetSdkVersion versionCode rootProject.versionCode versionName rootProject.versionName } dependencies { implementation project(':baselib') implementation project(':plplib') implementation project(':pdplib') implementation project(':cartlib') implementation project(':orderDetailLib') }
Size Constraints base module feature module + 4 MB
Slim down your app • Review dependencies • Enable Proguard
• Shrink resources • Use vector drawables • PNG -> WebP X MB 4 MB
pdplib.apk Instant Apps Building orderDetailLib.apk baselib.apk plplib.apk cartlib.apk .zip
Instant Apps API override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_no_network)
val addPaymentButton = findViewById(R.id.add_new_payment) as Button if (InstantApps.isInstantApp(this)) { addPaymentButton.visibility = View.GONE } }
Instant Apps API fun showInstallPrompt(analyticsManager: AnalyticsManager) { InstantApps.showInstallPrompt(this, 777, "instant_app")
analyticsManager.trackAction("download_app") }
Attention!!!
Version code and name Failure [INSTALL_FAILED_INVALID_APK: /data/app/ vmdl894193015.tmp/7_pdplib-app-instantApp.apk version code
0 inconsistent with 494] android { defaultConfig { versionCode rootProject.versionCode versionName rootProject.versionName } }
Proguard java.lang.NoSuchMethodError: No static method setCompatVectorFromResourcesEnabled(Z)V in class Landroid/support/v7/app/AppCompatDelegate; or
its super classes (declaration of 'android.support.v7.app.AppCompatDelegate' appears in / data/app/com.jet.jet.staging-IIohNI4xXzrcQ1tt01ksgA==/ base.apk) -keep class android.support.v7.app.AppCompatDelegate { *; }
Resources Task :cartlib:compileAppInstantAppFeatureJavaWithJavac /Users/yuliya/Desktop/jetApp/batman-android/cartlib/src/ main/java/com/jet/cartlib/mvp/cart/CartListFragment.java: 568: error: cannot find symbol
Toolbar toolbar = findViewById(R.id.toolbar); ^ symbol: variable toolbar location: class id Toolbar toolbar = findViewById(com.jet.baselib.R.id.toolbar);
Reusable Layouts in feature modules <merge xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=“http://schemas.android.com/tools"> <include layout="@layout/view_toolbar"
/> <TextView android:id="@+id/checkout_initial_breadcrumb_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="12sp" tools:text="Shipping>Payment>Review" /> </merge>
Secure network https://
Benefits • size reduction • modularization • code clean up
• new features (Smart Lock, Google Payments) • conversion rate +27% • cart size +7%
Q & A @YuliyaKaleda Thank you!!!