Slide 1

Slide 1 text

Hello App Indexing :) 2017/6/23 Otemachi Firebase #2

Slide 2

Slide 2 text

whoami Ryo Yamazaki / Application Engineer twitter: @ymnd github: @ymnder 2

Slide 3

Slide 3 text

product: Android App 3

Slide 4

Slide 4 text

topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ App Indexing: Pros/Cons 4

Slide 5

Slide 5 text

topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ App Indexing: Pros/Cons 5

Slide 6

Slide 6 text

What’s App Indexing 6

Slide 7

Slide 7 text

What’s App Indexing • Google ݕࡧͱ࿈ܞͯ͠ɺϢʔβʔͷϦϐʔτ཰Λ޲্ ͤ͞Δ • Chrome΍Google Search Appͷݕࡧ݁Ռ͔Β௚઀Ξϓ ϦʹભҠͰ͖Δ • ϢʔβʔʹΠϯετʔϧޙʹ࠶Ξϓϩʔν͢Δ͜ͱ͕Ͱ ͖Δ

Slide 8

Slide 8 text

Where can I see it: demo

Slide 9

Slide 9 text

Where can I see it • Chrome • Google Search App • Google Assistant

Slide 10

Slide 10 text

Why App Indexing

Slide 11

Slide 11 text

Why App Indexing

Slide 12

Slide 12 text

Why App Indexing

Slide 13

Slide 13 text

͔ͤͬͭͬͨ͘͘ͷʹ ͔ͭͬͯ΋Β͑ͳ͍

Slide 14

Slide 14 text

ΞϓϦʹ࠶๚ͯ͠ཉ͍͠ʂʂ

Slide 15

Slide 15 text

App Indexing

Slide 16

Slide 16 text

Who is the target • ΞϓϦΛΠϯετʔϧ͚ͨ͠Ͳɺ࢖Θͳ͘ͳͬͯ͠·ͬ ͨϢʔβʔɿre-engage • ࠓ࢖͍ͬͯΔϢʔβʔɿmore-engage • (ΞϓϦΛΠϯετʔϧ͍ͯ͠ͳ͍Ϣʔβʔ)

Slide 17

Slide 17 text

How effective is that? Case study: g.co/AppIndexing

Slide 18

Slide 18 text

Which device does it work? • ChromeΛΠϯετʔϧ͍ͯ͠Δ୺຤ • API 14Ҏ্Ͱಈ͘͜ͱΛ֬ೝࡁΈ • Search AppΛΠϯετʔϧ͍ͯ͠Δ୺຤ • ஫ҙɿAPI 16Ҏ্Ͱͳ͍ͱΠϯετʔϧͰ͖ͳ͍ • Google Assistant͕࢖͑Δ୺຤ • API 23Ҏ্Ͱ࢖͑ΔΑ͏ʹͳͬͨ

Slide 19

Slide 19 text

topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ App Indexing: Pros/Cons 19

Slide 20

Slide 20 text

Hello App Indexing :) • App Indexing • WebαΠτʹΞϓϦ΁ͷdeeplinkΛઃஔ • αΠτΛ։͍ͨͱ͖ʹΞϓϦ͕։͘ • App Indexing API • ΦʔτίϯϓϦʔτ • Google Search Appͷݕࡧ݁ՌʹաڈӾཡͨ͠Ξϓ Ϧͷϖʔδ͕දࣔ͞ΕΔ • ΩʔϫʔυͰΞϓϦͷϖʔδΛҾֻ͚ͬΒΕΔ

Slide 21

Slide 21 text

Hello App Indexing :) • App Indexing • WebαΠτʹΞϓϦ΁ͷdeeplinkΛઃஔ • αΠτΛ։͍ͨͱ͖ʹΞϓϦ͕։͘ • App Indexing API • ΦʔτίϯϓϦʔτ • Google Search Appͷݕࡧ݁ՌʹաڈӾཡͨ͠Ξϓ Ϧͷϖʔδ͕දࣔ͞ΕΔ • ΩʔϫʔυͰΞϓϦͷϖʔδΛҾֻ͚ͬΒΕΔ

Slide 22

Slide 22 text

Hello App Indexing :)

Slide 23

Slide 23 text

Hello App Indexing :) • App Indexing • WebαΠτʹΞϓϦ΁ͷdeeplinkΛઃஔ • αΠτΛ։͍ͨͱ͖ʹΞϓϦ͕։͘ • App Indexing API • ΦʔτίϯϓϦʔτ • Google Search Appͷݕࡧ݁ՌʹաڈӾཡͨ͠Ξϓ Ϧͷϖʔδ͕දࣔ͞ΕΔ • ΩʔϫʔυͰΞϓϦͷϖʔδΛҾֻ͚ͬΒΕΔ

Slide 24

Slide 24 text

Hello App Indexing API :)

Slide 25

Slide 25 text

App Indexing

Slide 26

Slide 26 text

Hello App Indexing :) • ΍Δ͜ͱ͸ͨͬͨ̏ͭ ᶃαΠτʹΞϓϦΛඥ෇͚Δ ᶄϝλλάΛαΠτʹ࢓ࠐΉ ᶅΞϓϦʹDeeplinkΛಡΈࠐΉ࣮૷Λ͍ΕΔ

Slide 27

Slide 27 text

How to connect with your site: web side • HTTPSͷ৔߹ & Android SDK Platform 23 or higher • Digital Assets Links • https:///.well-known/assetlinks.json

Slide 28

Slide 28 text

How to connect with your site: web side • HTTPͷ৔߹ • Search ConsoleͰWebͱΞϓϦΛඥ෇͚Δ • WebͱAppΛҧ͏ΞΧ΢ϯτͰ؅ཧͯͯ͠΋େৎ෉

Slide 29

Slide 29 text

Play Console

Slide 30

Slide 30 text

How to connect with your site: web side • αΠτʹmetaλάΛ௥Ճ͢Δ • custom URL͸ඇਪ঑͕ͩ࢖͑Δ package_id scheme host

Slide 31

Slide 31 text

How to connect with your site: app side

Slide 32

Slide 32 text

How to connect with your site: app side

Slide 33

Slide 33 text

How to connect with your site: app side

Slide 34

Slide 34 text

How to connect with your site: app side https://developer.android.com/guide/topics/manifest/data-element.html

Slide 35

Slide 35 text

How to connect with your site: app side @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recipe); onNewIntent(getIntent()); } protected void onNewIntent(Intent intent) { String action = intent.getAction(); String data = intent.getDataString(); if (Intent.ACTION_VIEW.equals(action) && data != null) { //write wonderful codes… } }

Slide 36

Slide 36 text

How to connect with your site: app side @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recipe); onNewIntent(getIntent()); } protected void onNewIntent(Intent intent) { String action = intent.getAction(); String data = intent.getDataString(); if (Intent.ACTION_VIEW.equals(action) && data != null) { //write wonderful codes… } }

Slide 37

Slide 37 text

How to connect with your site: app side @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recipe); onNewIntent(getIntent()); } protected void onNewIntent(Intent intent) { String action = intent.getAction(); String data = intent.getDataString(); if (Intent.ACTION_VIEW.equals(action) && data != null) { //write wonderful codes… } }

Slide 38

Slide 38 text

How do I test app indexing • manifestͷهड़͕߹͍ͬͯΔ͔ • Android StudioɿAnalyze -> Inspect Code • intent͸ਖ਼͘͠௨Δ͔ • adb shell am start -a android.intent.action.VIEW -d "{URL}" {package name} • Webʹmetaλά࢓ࠐΜͩͷʹಈ͔ͳ͍ • Google search಺ͷfetch as googleͰ࠶Ϋϩʔϧ • ΋͔ͯ͠͠ɺඥ෇͍ͯͳ͍ϦϯΫΛ։͍ͯΔʁ

Slide 39

Slide 39 text

Fetch as Google

Slide 40

Slide 40 text

Check Before Launch • First Click Free • ΫϦοΫͨ͠ઌ͸ͦͷ··ίϯςϯπΛݟΒΕΔΑ ͏ʹ • BackButton • ̍ͭલͷεΫϦʔϯʹ໭ΔΑ͏ʹ͢΂͖

Slide 41

Slide 41 text

App Indexing API

Slide 42

Slide 42 text

App Indexing API is updated…….. • 10.0.0͔ΒAPI͕େ͖͘มߋ͞Εͨ • codelabs • ஫ҙ • ೔ຊޠͷget started ͸ߋ৽͞Εͯͳ͍ • https://firebase.google.com/docs/app-indexing/ android/migrate

Slide 43

Slide 43 text

App Indexing API is updated……. • GoogleApiClientΛ࢖Θͳ͘ͳͬͨ • ΦʔτίϯϓϦʔτʹ࢖͏ϢʔβʔΞΫγϣϯͷϏϧυ Ϋϥε͕γϯϓϧʹͳͬͨ • ϢʔβʔΞΫγϣϯͷߋ৽ํ๏͕มΘͬͨ • ΠϯσοΫεʹΞΫγϣϯ͕௥Ճ͞Ε͍ͯΔ͜ͱΛ֬ ೝ͔ͯ͠ΒΞοϓσʔτΛߦ͏

Slide 44

Slide 44 text

App Indexing API is updated…… // Before import com.google.android.gms.appindexing.Action; import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.common.api.GoogleApiClient; // After import com.google.firebase.appindexing.Action; import com.google.firebase.appindexing.FirebaseUserActions; import com.google.firebase.appindexing.Indexable; import com.google.firebase.appindexing.builders.Actions;

Slide 45

Slide 45 text

App Indexing API is updated….. // Before import com.google.android.gms.appindexing.Action; import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.common.api.GoogleApiClient; // After import com.google.firebase.appindexing.Action; import com.google.firebase.appindexing.FirebaseUserActions; import com.google.firebase.appindexing.Indexable; import com.google.firebase.appindexing.builders.Actions;

Slide 46

Slide 46 text

App Indexing API is updated…. //Before public Action getAction() { Thing object = new Thing.Builder() .setName(mText) .setUrl(mUrl) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .build(); } // After public Action getAction() { return Actions.newView(mText, mUrl); }

Slide 47

Slide 47 text

App Indexing API is updated… //Before public Action getAction() { Thing object = new Thing.Builder() .setName(mText) .setUrl(mUrl) .build(); return new Action.Builder(Action.TYPE_VIEW) .setObject(object) .build(); } // After public Action getAction() { return Actions.newView(mText, mUrl); }

Slide 48

Slide 48 text

App Indexing API is updated.. //Before @Override protected void onStart() { super.onStart(); mClient.connect(); AppIndex.AppIndexApi.start(mClient, getAction()); } @Override protected void onStop() { AppIndex.AppIndexApi.end(mClient, getAction()); mClient.disconnect(); super.onStop(); }

Slide 49

Slide 49 text

App Indexing API is updated. // After @Override protected void onStart() { super.onStart(); FirebaseAppIndex.getInstance().update(getIndexable()); FirebaseUserActions.getInstance().start(getAction()); } @Override protected void onStop() { FirebaseUserActions.getInstance().end(getAction()); super.onStop(); }

Slide 50

Slide 50 text

Codelabs • https://codelabs.developers.google.com/codelabs/app-indexing/#0

Slide 51

Slide 51 text

topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ App Indexing: Pros/Cons 51

Slide 52

Slide 52 text

App Indexing: Pros • ΞϓϦ΁ͷ࠶๚ͷػձ͕૿΍ͤΔ • Google AssistantͰߋʹ઀৮ػձ͕૿͑ΔՄೳੑ͕ʁ • ΞϓϦΛ࢖ͬͯ΋Β͏ػձ૿΍ͤΔ • ΞϓϦͰ࠷ߴͷମݧΛ

Slide 53

Slide 53 text

App Indexing: Pros • ϞόΠϧͷݕࡧϥϯΩϯάΞϧΰϦζϜʹӨڹ • ܭଌͷڧԽ • ϞόΠϧαΠτ๚໰ऀͷΞϓϦΠϯετʔϧ཰ਪܭ • SearchConsole

Slide 54

Slide 54 text

App Indexing: Cons • ΞϓϦΛΠϯετʔϧͯ͠ͳ͍ͱભҠ͠ͳ͍ • re-engageࢪࡦ • fallback͸ͳ͍ • Πϯετʔϧಋઢ͸૿͑Δ͚Ͳɾɾɾ • Կނ͔ΞϓϦ͕։͔ͳ͍৔߹͕͋Δ • ൓өʹϥά͕͋Δ

Slide 55

Slide 55 text

App Indexing: Cons • ChromeʗSearchAppҎ֎ͰӾཡͨ͠৔߹͸ભҠ͠ͳ͍ • twitter: App Card, facebook: App Links

Slide 56

Slide 56 text

Grow App with App Indexing

Slide 57

Slide 57 text

͓ΘΓ

Slide 58

Slide 58 text

References http://qiita.com/mmusasabi/items/fd35037aecc1772dd11b http://qiita.com/nein37/items/3b69f85b97d0883eb1ca http://inside.pixiv.net/entry/2014/12/15/152113 http://stpsysdev.blogspot.jp/2016/02/androidappindexing.html https://www.youtube.com/watch?v=CwgWOHgHHJE https://www.youtube.com/watch?v=pl1-m8tJDmQ http://thebridge.jp/2015/11/what-is-appindexing https://realm.io/news/juan-gomez-android-app-indexing/ http://www.slideshare.net/wjarek/an-introduction-to-deep-linking-and-app-indexing-codelab http://stackoverflow.com/questions/31512465/app-indexing-with-ampersand-in-deep-link-not-working https://productforums.google.com/forum/#!topic/webmaster-ja/HdEAWX-YbsE;context-place=topicsearchin/ webmaster-ja/category$3Aapp-indexing%7Csort:relevance%7Cspell:false

Slide 59

Slide 59 text

References • First Click Free • https://support.google.com/news/publisher/answer/ 40543?hl=ja • https://productforums.google.com/forum/#!topic/ webmaster-ja/TRvgIx3Sr2k;context- place=topicsearchin/webmaster-ja/category$3Aapp- indexing • BackButton • https://webmasters.googleblog.com/2014/04/app- indexing-updates.html