app indexingのススメ(補足版)
TRANSCRIPT
![Page 1: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/1.jpg)
App Indexing のススメ (補足版)
consomme
![Page 2: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/2.jpg)
自己紹介• 山崎 正
• @consomme72
• ピクシブ株式会社 Androidアプリ開発
![Page 3: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/3.jpg)
アドベントカレンダー進行中http://qiita.com/advent-calendar/2014/pixiv
![Page 4: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/4.jpg)
書きましたhttp://inside.pixiv.net/entry/2014/12/15/152113
![Page 5: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/5.jpg)
図を作るのが面倒だったので 省略した部分の補足
![Page 6: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/6.jpg)
App Indexing とは• Googleの検索結果から直接アプリを開く
• アプリケーション選択ダイアログを経由しない
×
○
![Page 7: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/7.jpg)
実装方法は blogの記事と
Googleのドキュメントを参照
![Page 8: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/8.jpg)
First Click Free• 最初のクリックは登録、購読不要の原則
• コンテンツの表示を遮ってはいけない
![Page 9: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/9.jpg)
戻るボタンの動作• App Indexingでアプリを開いた後に戻るボタンを押した時はGoogle検索結果に遷移させる
○×
![Page 10: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/10.jpg)
対応しないとエラー判定されます
![Page 11: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/11.jpg)
App Indexing API
• アプリからディープリンクをGoogleに通知
• オートコンプリートからアプリを起動できる
![Page 12: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/12.jpg)
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://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/13.jpg)
https://developer.android.com/reference/com/google/android/gms/appindexing/AppIndexApi.html
![Page 14: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/14.jpg)
WebURLをnullにすると どうなるの?
![Page 15: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/15.jpg)
不明(特に説明なし) たぶんオートコンプリートは効くんじゃないかなぁ そのデータが共有されるのかどうかも不明
![Page 16: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/16.jpg)
App Indexing API 注意点• コンテンツがない場合はAPIをコールしない
• 無駄に複数回APIをコールしない
• オートコンプリートは設定が必要
![Page 17: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/17.jpg)
端末内検索を有効化
デフォルトで有効化する方法は今のところない
![Page 18: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/18.jpg)
いろいろと今後に期待
![Page 20: App indexingのススメ(補足版)](https://reader031.vdocuments.site/reader031/viewer/2022012405/55a78f741a28ab35478b4577/html5/thumbnails/20.jpg)
以上