SlideShare ist ein Scribd-Unternehmen logo
1 von 63
Downloaden Sie, um offline zu lesen
Instant App Intro
About Me
•https://github.com/Jintin

•Developer @ Carousell
Fun projects
• Swimat - https://github.com/Jintin/Swimat

• andle - https://github.com/Jintin/andle

• transai - https://github.com/Jintin/transai

• IMZh - https://github.com/Jintin/IMZh
Instant App
Why Instant App
Web is eating the world
App vs Web
• Url-base

• Find-ability

• Share-ability

• Upgradability

• Compatibility
Apps downloads / month
Google Play Evolution
?
Use App as Web ?
Instant App
What is Instant App ?
Instantly
without Installation

Use and forget
Usage
Instant App
• No need to Install

• Url-base

• Not trail version of Installation App
To Do or Not to Do
• Think use case first

• Role between App and Web

• Android 6.0 only (currently)

• Some Limitation
Developer story
Requirement
• App Link

• Https connection only

• Android SDK 6.0

• Runtime permission if need

• Android studio 3.0

• Size Limit 4MB per bundle

• Code Signing v2
App Link
• Add intent-filter to your activity to handle url

• add assetlinks.json in your website .well-
known/ folder to certificate with SSL enable
Intent filter
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="http"
android:host="www.xxx.com" />
<data
android:scheme="https"
android:host=“www.xxx.com" />
</intent-filter>
Assetlinks.json
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": “com.xxx.xxx”,
"sha256_cert_fingerprints":
[“F9:9B:EA:10:2C:44:C5:A9:4C:BD:DF:4A:E8:BC:B2:28:CC:D7:1B:9F:DD:00:
72:76:F2:E5:FD:15:37:B1:2F:5E"]
}
}]
Available Permission
• BILLING

• ACCESS_COARSE_LOCATION

• ACCESS_FINE_LOCATION

• ACCESS_NETWORK_STATE

• CAMERA

• INSTANT_APP_FOREGROUND_SERVICE (O only)

• INTERNET

• READ_PHONE_NUMBERS only in Android (O only)

• RECORD_AUDIO

• VIBRATE
Android Studio 3
• Google Maven Repository

• Gradle plugin 3.0+

• New Implementation & Api dependency

• Old Compile convert to Api
Implementation vs Api
// dependencies {
// compile 'com.google.dagger:dagger:2.7'
// }
dependencies {
implementation 'com.google.dagger:dagger:2.7'
}
dependencies {
api 'com.google.dagger:dagger:2.7'
}
Implementation vs Api
4MB Limit
• Count per bundle (feature + base)

• Can has multi bundle
Avoid 4MB Limit
• Proguard

• Avoid Library

• Use Drawable

• Use Vector image

• Use WebP image
Code Sign V2
• Fast 

• Safe

• Compatibility
Code Sign V2
Structure
App Instant
Structure
Base
Feature
Instant app module
• New plugin type

• Wrapper of the detail feature
Structure
App Instant
Base
Feature
Feature module
• New plugin type

• Generate lib in app build process

• Generate apk in instant app build
Base Feature
• Only one

• Contain common resource, lib … etc

• Defined by `baseFeature true` in build.gradle

• Bind with other feature & app (bi-direction)
How to…
First Refactoring
• Remove unused code

• Modularize

• Proguard

• Avoid Library ?!
• Nexus 5X, Nexus 6P, Pixel, Pixel XL,
Galaxy S7 running Android 6.0 or higher.

• Nexus 5X (Nexus 6P) image running
Android 6.0 (API level 23), x86, with
Google APIs
Setup Device
Setup Device (before O)
install instant SDK
The easiest way
Wizard
One click enable
Done ?
Q1: Existing project ?
Q2: How to solve …
Start from the beginning
App
Original
App
Split Code
Feature
App Instant
Create Instant app
Feature
App
Feature
Instant
Base
Create Base Feature
Create Multi Feature
App
Feature
Instant
Base
Feature2
Create Multi Feature
App
Feature
Instant
Base
Feature2 Feature3
Steps(single feature)
• Put code into feature module

• Add app module wrapper

• Add instant app module wrapper

• Link reference together
Steps(with base feature)
• Split feature into feature and base

• Move the `baseFeature true` flag to base

• Link reference together
Steps(with multi feature)
• Link baseFeature together

• Connect other module by URL

• Check the resource is not conflict

• Check if the zip file has multi-apk
Work with different
• compile ‘com.google.android.instantapps:instantapps:1.0.0’

• func App.isInstantApp(Context context)

• func showInstallPrompt(Activity activity, int
requestCode, String referrer)
Demo
Distribution
Play Console
Relevant Links
• Documentation: 

g.co/InstantApps

• For technical questions: 

https://stackoverflow.com/questions/tagged/android-
instant-apps

• Reporting Studio/tools bugs: 

https://developer.android.com/studio/report-bugs.html
Q&A
• https://developer.android.com/topic/instant-apps

• https://medium.com/vimeo-engineering-blog/vimeo-android-instant-
apps-2f8b1e94760c

• https://play.google.com/about/other-programs/android-instant-apps/

• https://developer.android.com/topic/performance/reduce-apk-size.html

• https://jeroenmols.com/blog/2017/06/14/androidstudio3/

• https://source.android.com/security/apksigning/v2

• http://www.androidauthority.com/use-android-instant-apps-749544/

• https://developer.android.com/stories/instant-apps.html

Weitere ähnliche Inhalte

Was ist angesagt?

アプリエンジニアがReactNativeに乗り換えたら
アプリエンジニアがReactNativeに乗り換えたらアプリエンジニアがReactNativeに乗り換えたら
アプリエンジニアがReactNativeに乗り換えたら
kzm hr
 

Was ist angesagt? (20)

React Native Intro
React Native IntroReact Native Intro
React Native Intro
 
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組みReact Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
React Nativeアプリをリリースし続けるために、最初に行う8つの取り組み
 
Android DevConference - Scaling Mobile Development
Android DevConference - Scaling Mobile DevelopmentAndroid DevConference - Scaling Mobile Development
Android DevConference - Scaling Mobile Development
 
Erica Cooksey Reactathon 2018
Erica Cooksey Reactathon 2018Erica Cooksey Reactathon 2018
Erica Cooksey Reactathon 2018
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Automating PhoneGap Build
Automating PhoneGap BuildAutomating PhoneGap Build
Automating PhoneGap Build
 
Reark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJavaReark : a Reference Architecture for Android using RxJava
Reark : a Reference Architecture for Android using RxJava
 
DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩DevOps + MongoDB Realm Serverless Functions = 🤩
DevOps + MongoDB Realm Serverless Functions = 🤩
 
Pepperoni – A framework for spicing up your mobile apps with React Native
Pepperoni – A framework for spicing up your mobile apps with React NativePepperoni – A framework for spicing up your mobile apps with React Native
Pepperoni – A framework for spicing up your mobile apps with React Native
 
Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps Pepperoni 2.0 - How to spice up your mobile apps
Pepperoni 2.0 - How to spice up your mobile apps
 
Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017Angular vs React Smackdown - Devoxx BE 2017
Angular vs React Smackdown - Devoxx BE 2017
 
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
 
jhipster-geekle-gbloch
jhipster-geekle-gblochjhipster-geekle-gbloch
jhipster-geekle-gbloch
 
Swagger in the API Lifecycle
Swagger in the API LifecycleSwagger in the API Lifecycle
Swagger in the API Lifecycle
 
CraftCamp for Students - Introduction to JHipster
CraftCamp for Students - Introduction to JHipsterCraftCamp for Students - Introduction to JHipster
CraftCamp for Students - Introduction to JHipster
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
 
Putting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native BostonPutting the Native in React Native - React Native Boston
Putting the Native in React Native - React Native Boston
 
Integrating Indigo.Design App Builder with GitHub
Integrating Indigo.Design App Builder with GitHubIntegrating Indigo.Design App Builder with GitHub
Integrating Indigo.Design App Builder with GitHub
 
アプリエンジニアがReactNativeに乗り換えたら
アプリエンジニアがReactNativeに乗り換えたらアプリエンジニアがReactNativeに乗り換えたら
アプリエンジニアがReactNativeに乗り換えたら
 
SONY BBS - React Native
SONY BBS - React NativeSONY BBS - React Native
SONY BBS - React Native
 

Ähnlich wie Instant app Intro

Dayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webeditionDayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webedition
Martin Davis III
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
Tianwei_liu
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
Nicholas Jansma
 

Ähnlich wie Instant app Intro (20)

DIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development todayDIGIT Noe 2016 - Overview of front end development today
DIGIT Noe 2016 - Overview of front end development today
 
Cross Platform Mobile App Development
Cross Platform Mobile App DevelopmentCross Platform Mobile App Development
Cross Platform Mobile App Development
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
Google IO 2017 Recap
Google IO 2017 RecapGoogle IO 2017 Recap
Google IO 2017 Recap
 
Dayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webeditionDayton webusers creatinghybridapps-webedition
Dayton webusers creatinghybridapps-webedition
 
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
Ivan Jovanovic - Micro Frontends - Codemotion Rome_2019
 
I knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile appsI knew there had to be a better way to build mobile apps
I knew there had to be a better way to build mobile apps
 
Lesson 1. Create project Sunshine
Lesson 1. Create project SunshineLesson 1. Create project Sunshine
Lesson 1. Create project Sunshine
 
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With SwiftPhilly CocoaHeads 20160414 - Building Your App SDK With Swift
Philly CocoaHeads 20160414 - Building Your App SDK With Swift
 
Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016Your choices for building a mobile app in 2016
Your choices for building a mobile app in 2016
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
 
手機自動化測試和持續整合
手機自動化測試和持續整合手機自動化測試和持續整合
手機自動化測試和持續整合
 
iOS extension
iOS extensioniOS extension
iOS extension
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
slides.pptx
slides.pptxslides.pptx
slides.pptx
 
«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​«I knew there had to be a better way to build mobile app»​
«I knew there had to be a better way to build mobile app»​
 
Building mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and BackboneBuilding mobile apps with PhoneGap and Backbone
Building mobile apps with PhoneGap and Backbone
 
Best Practice on Android Instant Apps
Best Practice on Android Instant AppsBest Practice on Android Instant Apps
Best Practice on Android Instant Apps
 
React native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile AppsReact native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile Apps
 
Joomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiencesJoomla as a mobile App backend - ideas, examples and experiences
Joomla as a mobile App backend - ideas, examples and experiences
 

Mehr von Jintin Lin

Android Service Intro
Android Service IntroAndroid Service Intro
Android Service Intro
Jintin Lin
 

Mehr von Jintin Lin (17)

KSP intro
KSP introKSP intro
KSP intro
 
Annotation Processing
Annotation ProcessingAnnotation Processing
Annotation Processing
 
我的開源之旅
我的開源之旅我的開源之旅
我的開源之旅
 
Dagger 2 vs koin
Dagger 2 vs koinDagger 2 vs koin
Dagger 2 vs koin
 
ButterKnife
ButterKnifeButterKnife
ButterKnife
 
數學系的資訊人生
數學系的資訊人生數學系的資訊人生
數學系的資訊人生
 
KVO implementation
KVO implementationKVO implementation
KVO implementation
 
iOS NotificationCenter intro
iOS NotificationCenter introiOS NotificationCenter intro
iOS NotificationCenter intro
 
App design guide
App design guideApp design guide
App design guide
 
J霧霾
J霧霾J霧霾
J霧霾
 
transai
transaitransai
transai
 
Swimat - Swift formatter
Swimat - Swift formatterSwimat - Swift formatter
Swimat - Swift formatter
 
Swift Tutorial 2
Swift Tutorial  2Swift Tutorial  2
Swift Tutorial 2
 
Swift Tutorial 1
Swift Tutorial 1Swift Tutorial 1
Swift Tutorial 1
 
Andle
AndleAndle
Andle
 
Realism vs Flat design
Realism vs Flat designRealism vs Flat design
Realism vs Flat design
 
Android Service Intro
Android Service IntroAndroid Service Intro
Android Service Intro
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Instant app Intro