7. V S We b V i e w, I n t e n t ( B ro w s e r A p p )
WebView,Intent (Browser App)
8. V S We b V i e w, I n t e n t ( B ro w s e r A p p )
WebView,Intent (Browser App)
• Browser Appでは遷移してからWebサイトを表示す
るまでが重い、遅い
• Browser Appでは別アプリの表示となるなのでUIに
統一感を出せない(シームレスに表示できない)
• WebViewではセキュリティへの懸念がある
9. V S We b V i e w, I n t e n t ( B ro w s e r A p p )
Chrome Custom Tabs
10. V S We b V i e w, I n t e n t ( B ro w s e r A p p )
Chrome Custom Tabs
• Prefetchによる表示速度の向上
• UIのカスタマイズが可能
• Choromeベースのセキュリティと機能
翻訳、パスワード自動保存、オートフィル、
タップして検索、etc…
※ Chromeインストール済み v45以上
12. H o w t o
See -> NET BIZ DIV.TECH BLOG
はじめての Chrome Custom Tabs
http://tech.recruit-mp.co.jp/mobile/post-7628/
13. H o w t o - D e f a u l t
CustomTabsIntent tabsIntent = new CustomTabsIntent.Builder().build();
String packageName = CustomTabsHelper.getPackageNameToUse(this);
tabsIntent.intent.setPackage(packageName);
tabsIntent.launchUrl(this, URI);
15. H o w t o - C u s t o m
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent tabsIntent = builder.setShowTitle(true)
.enableUrlBarHiding()
.setToolbarColor(getResources().getColor(R.color.brand_sub))
.setCloseButtonIcon(BitmapFactory.decodeResource(getResources(
R.drawable.ic_arrow_back))
.setStartAnimations(this, R.anim.slide_in_right,
R.anim.slide_out_left)
.setExitAnimations(this, android.R.anim.slide_in_left,
android.R.anim.slide_out_right)
.build();
String packageName = CustomTabsHelper.getPackageNameToUse(this);
tabsIntent.intent.setPackage(packageName);
tabsIntent.launchUrl(this, URI);
16. H o w t o - C u s t o m
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent tabsIntent = builder.setShowTitle(true)
.enableUrlBarHiding()
.setToolbarColor(getResources().getColor(R.color.brand_sub))
.setCloseButtonIcon(BitmapFactory.decodeResource(getResources(
R.drawable.ic_arrow_back))
.setStartAnimations(this, R.anim.slide_in_right,
R.anim.slide_out_left)
.setExitAnimations(this, android.R.anim.slide_in_left,
android.R.anim.slide_out_right)
.build();
String packageName = CustomTabsHelper.getPackageNameToUse(this);
tabsIntent.intent.setPackage(packageName);
tabsIntent.launchUrl(this, URI);
22. C h ro m e C u s t o m Ta b s
• 機能を紹介
• 使用例を紹介
23. C h ro m e C u s t o m Ta b s
• 機能を紹介
• 使用例を紹介
24. C h ro m e C u s t o m Ta b s
• 機能を紹介
• 使用例を紹介
使用例から思ったこと
25. A p p s
• Twitter
• Feedly
• Stack Exchange
• Skyscanner
26. A p p s
– A n d ro i d D e v e l o p e r s B l o g : C h ro m e c u s t o m t a b s s m o o t h t h e
t r a n s i t i o n b e t w e e n a p p s a n d t h e w e b
“Users will begin to experience custom tabs in the
coming weeks in Feedly, The Guardian, Medium,
Player.fm, Skyscanner, Stack Overflow, Tumblr, and
Twitter, with more coming soon. To get started
integrating custom tabs into your own application,
check out the developer guide.”