Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hello App Indexing

934a9e49edc3174d09ab2e09daed5062?s=47 ymnder
June 23, 2017

Hello App Indexing

Otemachi.Firebase#2 2017/6/23

934a9e49edc3174d09ab2e09daed5062?s=128

ymnder

June 23, 2017
Tweet

Transcript

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

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

    2
  3. product: Android App 3

  4. topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ

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

    App Indexing: Pros/Cons 5
  6. What’s App Indexing 6

  7. What’s App Indexing • Google ݕࡧͱ࿈ܞͯ͠ɺϢʔβʔͷϦϐʔτ཰Λ޲্ ͤ͞Δ • Chrome΍Google Search

    Appͷݕࡧ݁Ռ͔Β௚઀Ξϓ ϦʹભҠͰ͖Δ • ϢʔβʔʹΠϯετʔϧޙʹ࠶Ξϓϩʔν͢Δ͜ͱ͕Ͱ ͖Δ
  8. Where can I see it: demo

  9. Where can I see it • Chrome • Google Search

    App • Google Assistant
  10. Why App Indexing

  11. Why App Indexing

  12. Why App Indexing

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

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

  15. App Indexing

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

    (ΞϓϦΛΠϯετʔϧ͍ͯ͠ͳ͍Ϣʔβʔ)
  17. How effective is that? Case study: g.co/AppIndexing

  18. Which device does it work? • ChromeΛΠϯετʔϧ͍ͯ͠Δ୺຤ • API 14Ҏ্Ͱಈ͘͜ͱΛ֬ೝࡁΈ

    • Search AppΛΠϯετʔϧ͍ͯ͠Δ୺຤ • ஫ҙɿAPI 16Ҏ্Ͱͳ͍ͱΠϯετʔϧͰ͖ͳ͍ • Google Assistant͕࢖͑Δ୺຤ • API 23Ҏ্Ͱ࢖͑ΔΑ͏ʹͳͬͨ
  19. topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ

    App Indexing: Pros/Cons 19
  20. Hello App Indexing :) • App Indexing • WebαΠτʹΞϓϦ΁ͷdeeplinkΛઃஔ •

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

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

  23. Hello App Indexing :) • App Indexing • WebαΠτʹΞϓϦ΁ͷdeeplinkΛઃஔ •

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

  25. App Indexing

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

  27. How to connect with your site: web side • HTTPSͷ৔߹

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

    • Search ConsoleͰWebͱΞϓϦΛඥ෇͚Δ • WebͱAppΛҧ͏ΞΧ΢ϯτͰ؅ཧͯͯ͠΋େৎ෉
  29. Play Console

  30. How to connect with your site: web side • αΠτʹmetaλάΛ௥Ճ͢Δ

    • custom URL͸ඇਪ঑͕ͩ࢖͑Δ package_id scheme host
  31. How to connect with your site: app side

  32. How to connect with your site: app side

  33. How to connect with your site: app side

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

  35. 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… } }
  36. 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… } }
  37. 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… } }
  38. 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Ͱ࠶Ϋϩʔϧ • ΋͔ͯ͠͠ɺඥ෇͍ͯͳ͍ϦϯΫΛ։͍ͯΔʁ
  39. Fetch as Google

  40. Check Before Launch • First Click Free • ΫϦοΫͨ͠ઌ͸ͦͷ··ίϯςϯπΛݟΒΕΔΑ ͏ʹ

    • BackButton • ̍ͭલͷεΫϦʔϯʹ໭ΔΑ͏ʹ͢΂͖
  41. App Indexing API

  42. App Indexing API is updated…….. • 10.0.0͔ΒAPI͕େ͖͘มߋ͞Εͨ • codelabs •

    ஫ҙ • ೔ຊޠͷget started ͸ߋ৽͞Εͯͳ͍ • https://firebase.google.com/docs/app-indexing/ android/migrate
  43. App Indexing API is updated……. • GoogleApiClientΛ࢖Θͳ͘ͳͬͨ • ΦʔτίϯϓϦʔτʹ࢖͏ϢʔβʔΞΫγϣϯͷϏϧυ Ϋϥε͕γϯϓϧʹͳͬͨ

    • ϢʔβʔΞΫγϣϯͷߋ৽ํ๏͕มΘͬͨ • ΠϯσοΫεʹΞΫγϣϯ͕௥Ճ͞Ε͍ͯΔ͜ͱΛ֬ ೝ͔ͯ͠ΒΞοϓσʔτΛߦ͏
  44. 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;
  45. 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;
  46. 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); }
  47. 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); }
  48. 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(); }
  49. 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(); }
  50. Codelabs • https://codelabs.developers.google.com/codelabs/app-indexing/#0

  51. topics ᶃ What’s App Indexing ᶄ Hello App Indexing ᶅ

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

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

    SearchConsole
  54. App Indexing: Cons • ΞϓϦΛΠϯετʔϧͯ͠ͳ͍ͱભҠ͠ͳ͍ • re-engageࢪࡦ • fallback͸ͳ͍ •

    Πϯετʔϧಋઢ͸૿͑Δ͚Ͳɾɾɾ • Կނ͔ΞϓϦ͕։͔ͳ͍৔߹͕͋Δ • ൓өʹϥά͕͋Δ
  55. App Indexing: Cons • ChromeʗSearchAppҎ֎ͰӾཡͨ͠৔߹͸ભҠ͠ͳ͍ • twitter: App Card, facebook:

    App Links
  56. Grow App with App Indexing

  57. ͓ΘΓ

  58. 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
  59. 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