본 포스팅은 ChromeとAndroidの過去・現在・未来 을 기본으로 번역하여 작성했습니다
제 일본어 실력으로 인하여 오역이나 오타가 발생할 수 있습니다.
실제 슬라이드의 일본어
부분을 번역했다는 점 양해바랍니다.
Chrome과 Android의 과거・현재・미래
This is the last session of DroidKaigi
Thank you for coming to my session
마지막까지 즐기세요!
About Me
Shinobu Okano
@perandoOS
Mercari, Inc
Mercari는 간단하게 사고팔수 있어 안심 ・ 안전한 거래가 가능한 무료 앱입니다.
shinobu.apk
shinobu.apk #1의 공개토론 녹음 파일과 Show Notets를 공개했습니다!
여유로운 Android Framework Code Reading
여유로운 Android Framework Code Reading #2을 개최했습니다
WebView
고통스럽다
WebView History
1.x ~ 4.3.x | 4.4.x | 5.0 ~ |
---|---|---|
WebKit | Chromium | System WebView (APK) |
Google I/O 2012 Android WebView
Migrating to WebView in Android 4.4
Android System WebView
https://play.google.com/store/apps/details?id=com.google.android.webview
Android WebView의 진화와 구현
Chrome Custom tabs
Show the Chrome Tab like a my app browser
Intent / Chrome Custom Tabs
Chrome Custom Tabs
App Process –(Intent)–> Chrome Process
Setup Chrome Custom Tabs
Custom Tabs Support Library
https://developer.android.com/tools/support-library/features.html#custom-tabs
Shared util module (Optional)
https://github.com/GoogleChrome/custom-tabs-client/tree/master/shared
Chrome Custom tabs Starter Kit
dependencies {
compile 'com.android.support:customtabs:23.1.1'
compile project(':shared')
}
Uri URI = Uri.parse("https://android.com/");
CustomTabsIntent tabsIntent = new CustomTabsIntent.Builder().build();
String packageName = CustomTabsHelper.getPackageNameToUse(this);
tabsIntent.intent.setPackage(packageName);
tabsIntent.launchUrl(this, getUri());
app to customize how Chrome looks and feels
UI customization
CustomTabsIntent tabsIntent = new CustomTabsIntent.Builder()
.setShowTitle(true)
.setToolbarColor(0x77C159)
.setStartAnimations(this, R.anim.slide_in_right, R.anim.slide_out_left)
.setExitAnimations(this, R.anim.slide_in_left, R.anim.slide_out_right)
.setCloseButtonIcon(back)
.setActionButton(droid, "android", getActionButtonIntent())
.addMenuItem("android menu", getActionButtonIntent()) .build();
String package = CustomTabsHelper.getPackageNameToUse(this);
tabsIntent.intent.setPackage(package);
tabsIntent.launchUrl(this, Uri.parse("https://android.com/"));
UI Customize
No Customize vs UI Customize
making the transition from app to web content fast and seamless
optimized to load faster than WebViews and traditional methods of launching Chrome
http://3.bp.blogspot.com/-bsqTJQg_KG8/VecqcRS1SnI/AAAAAAAACAM/nclxZZ1bOxA/s1600/CCT_Large+2.gif
Wram up / Pre-fetch
Use Chrome features
Chrome Custom Tabs can replace the WebView?
NO!!!!!!!!!!
Why?
세밀한 Handling이 안된다
+비전의 WebChromeClient
+비전의 WebViewClient
+JavaScriptInterface
CustomTabsCallback#onNavigationEvent 함수에서 페이지(Tab)을 읽기 시작・종료, 닫기・열었다는 정보라면 알려준다
Best Practices for Custom Tabs
https://medium.com/google-developers/best-practices-for-custom-tabs-5700e55143ee
Android Intents with Chrome
Chrome이Intent Syntac URL을 해석해서 Intent를 실행한다
<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="mercariapp" android:host="run:" />
</intent-filter>
<a href= “intent://run/#Intent; scheme=mercariapp;package=com.mercariapp.mercari; end”>Run Mercari</a>
Debugging WebViews
webView.setWebContentsDebuggingEnabled(true);
Android 4.4 이상
https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/webviews
Web App Manifest
Define the metadata associated with your web application in a JSON-based manifest.
Manifest and its members
Manifest by Google IO 2015
{
"name": "Google I/O 2015",
"short_name": "I/O 2015",
"display": "standalone",
"icons": [{
"src": "images/touch/homescreen144.png",
"sizes": "144x144",
"type": "image/png"
},…..],
"gcm_sender_id": "608394197750",
"gcm_user_visible_only": true
}
<link rel="manifest" href="manifest.json">
view-source: https://events.google.com/io2015/
App Install Banner
Service Worker
스마트폰 체험을 한걸음 앞으로 프로그레시브 웹 앱 작성법
Google Eiji Kitamura
??
Web App Manifest = Web Technology
but
Native app install banner
similar to Web app install banners, but instead of adding to the home screen will let the user install your native app without leaving your site
Criteria to Show the Banner
Testingflag
chrome://flags/#bypass-app-banner-engagement-checks
Native app install banner - manifest.json
{
"name": "Native app install banner Sample",
"short_name": "Native app install banner Sample",
"icons": [{
"src": "image/ic_android_black_48dp.png",
"sizes": "144x144",
"type": "image/png"
}],
"prefer_related_applications": true,
"related_applications": [{
"platform": "play",
"id": "com.kouzoh.mercari"
}]
}
Web App Manifest
- 草案(Working Draft)
Native app Install Banners
App Stream
streaming
when application don’t have installed.Streaming apps?
Very Cool!!!!!!!!!!
“This uses a new cloud-based technology that we’re currently experimenting wit”
http://insidesearch.blogspot.jp/2015/11/new-ways-to-find-and-stream-app-content.html
New ways to find (and stream) app content in Google Search
http://insidesearch.blogspot.jp/2015/11/new-ways-to-find-and-stream-app-content.html
Trial Run Ads
App ad format that lets a user play a game for up to 60 seconds by streaming
content from the app before downloading
Introducing new interactive ads to drive app installs
https://adwords.googleblog.com/2015/12/trial-run-ads-interactive-interstitials-beta.html
Chrome Platform Status
Chrome와 Android의 향후에 대해서
Thanks!!
Enjoy After Party!!
comments powered by Disqus
Subscribe to this blog via RSS.