Top Banner
App Indexing のススメ (補足版) consomme
20

App indexingのススメ(補足版)

Jul 16, 2015

Download

Engineering

consomme72
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: App indexingのススメ(補足版)

App Indexing のススメ (補足版)

consomme

Page 2: App indexingのススメ(補足版)

自己紹介• 山崎 正

• @consomme72

• ピクシブ株式会社 Androidアプリ開発

Page 3: App indexingのススメ(補足版)

アドベントカレンダー進行中http://qiita.com/advent-calendar/2014/pixiv

Page 4: App indexingのススメ(補足版)

書きましたhttp://inside.pixiv.net/entry/2014/12/15/152113

Page 5: App indexingのススメ(補足版)

図を作るのが面倒だったので 省略した部分の補足

Page 6: App indexingのススメ(補足版)

App Indexing とは• Googleの検索結果から直接アプリを開く

• アプリケーション選択ダイアログを経由しない

×

Page 7: App indexingのススメ(補足版)

実装方法は blogの記事と

Googleのドキュメントを参照

Page 8: App indexingのススメ(補足版)

First Click Free• 最初のクリックは登録、購読不要の原則

• コンテンツの表示を遮ってはいけない

Page 9: App indexingのススメ(補足版)

戻るボタンの動作• App Indexingでアプリを開いた後に戻るボタンを押した時はGoogle検索結果に遷移させる

○×

Page 10: App indexingのススメ(補足版)

対応しないとエラー判定されます

Page 11: App indexingのススメ(補足版)

App Indexing API

• アプリからディープリンクをGoogleに通知

• オートコンプリートからアプリを起動できる

Page 12: App indexingのススメ(補足版)

public class SearchActivity extends Activity {

private GoogleApiClient mGoogleApiClient;

private static final Uri APP_URI = Uri.parse("android-app://jp.pxv.android/pixiv/illusts/tag/C87");

@Override public void onCreate(Bundle savedInstanceState) { ... mGoogleApiClient = new GoogleApiClient.Builder(this).addApi(AppIndex.APP_INDEX_API).build(); ... }

@Override protected void onStart() { super.onStart();

mGoogleApiClient.connect();

String title = "App Indexing API Title"; Uri webUri = Uri.parse("http://www.pixiv.net/search.php?s_mode=s_tag&word=C87"); Uri touchUri = Uri.parse("http://touch.pixiv.net/search.php?s_mode=s_tag_full&word=C87");

AppIndex.AppIndexApi.view(mGoogleApiClient, this, APP_URI, title, webUri, null); AppIndex.AppIndexApi.view(mGoogleApiClient, this, APP_URI, title, touchUri, null); }

@Override protected void onStop() { super.onStop();

AppIndex.AppIndexApi.viewEnd(mGoogleApiClient, this, APP_URI); mGoogleApiClient.disconnect(); } }

Page 13: App indexingのススメ(補足版)

https://developer.android.com/reference/com/google/android/gms/appindexing/AppIndexApi.html

Page 14: App indexingのススメ(補足版)

WebURLをnullにすると どうなるの?

Page 15: App indexingのススメ(補足版)

不明(特に説明なし) たぶんオートコンプリートは効くんじゃないかなぁ そのデータが共有されるのかどうかも不明

Page 16: App indexingのススメ(補足版)

App Indexing API 注意点• コンテンツがない場合はAPIをコールしない

• 無駄に複数回APIをコールしない

• オートコンプリートは設定が必要

Page 17: App indexingのススメ(補足版)

端末内検索を有効化

デフォルトで有効化する方法は今のところない

Page 18: App indexingのススメ(補足版)

いろいろと今後に期待

Page 19: App indexingのススメ(補足版)

エンジニア募集中http://recruit.pixiv.net/

Page 20: App indexingのススメ(補足版)

以上