- Adding Wearable Features to Notifications
- Creating a Notification
- Receiving Voice Input in a Notification
- Adding Pages to a Notification
- Stacking Notifications
概要
- スマホと Wear が接続されていると、Notification が Wear にも表示(同期)される。
- Wear では通知はカードとして表示され、このカードが表示されるところを context stream という。
- これまでの通知でももちろん Wear に表示されるが、Wear 用に Notification を拡張することができる。
Notification を作る
Notification の作成には NotificationCompat.Builder を使う。これで作っておけば、システムがかってにスマホと Wear で通知の見た目を変えてくれる。
通知の発行には NotificationManagerCompat を使う(NotificationManager ではなく)。
■ SmallIcon だけの Notification
int notificationId = 001;
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif);
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU3glaVBWsMmGN9mWxALA1V1vX0pVn3903R0QlIcnEhRysNjkz7Yc07To7PgxcrY5xF-2RW1FdPJ2F4Xv-qWOt7gZTcaQDXcC143KGltUFm4bWw0gknjq8RzaGTxwPRi9B2LcSGhnyMr-I/s320/Screenshot_2014-07-09-16-32-42.png)
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif6O31JndARF3mZzwholgCC4ZZfj1oMSohjcnohvdToU4ZosUR9_8Q45egWjH6i_rwVNlgRKMuEMIWjfBO_Xj47CEZqJXI7SNQzNWBRjxuYjeskhdI0QIsDNY_iYQM5_a0PH4M7gvWlnMV/s200/device-2014-07-09-163228.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-yhcMduiyi_PF_u0IKBDnz7hzRHs_52NN8Vi2HyJ3dSmWRDhrGPKF0FSwc5OCED96wzXIvayy-7bBNFf8zizrnL82lny1QPnxeBk0fAOKQ5Nt2yMF-TirZ-0ARNW6pobhLNJrotIYKv5j/s200/device-2014-07-09-163237.png)
Wearのカードの右上に表示されるアイコンは setSmallIcon() で指定したものではなく、アプリアイコンになる。 タップしたときの背景色はどこから来てるのかよくわからない。アプリアイコンのカラーパレット?
■ タイトルとメッセージありの Notification
int notificationId = 001;
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc8JX1UNhmMSZ6o5edmYomUPnT7YkCOsH5YBhEA5sBmOcfABbPbLuAocr5uprRUGzJ9Q58omJW5tciW_GPrHmxtN31VXFDE2pY3KdFfktsKtJqcxU2jpvquLtdN1CM1aij4HjLIUDRE53a/s320/Screenshot_2014-07-09-16-42-17.png)
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS2n6eR2809taMr5fReWIVkBhz7SMJZ8S-p1zlMQ9ahKe-DknKlilMEkXylOGcKSyruSN-yhj32HRdY9KmLhUTa0QNcyJWg0TWa90w33vu51qKSI3J3shuG3HY5rQNqP5Q9JhYpbVP1NMe/s200/device-2014-07-09-164248.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaUfE3_d2gdruGGX8yUGMdwD25NKcJ8A3K7q_MZQOgKmZPp_4l1LV33DQg_1r_OMpnVZnUFPvmTaB9fGGVwxWQF-mcYNxEivsUMAke8Hu52njfQyunXtP4NqjkBC0jjAgRKAtFczQoB7Pi/s200/device-2014-07-09-164309.png)
■ Content Intent ありの Notification
int notificationId = 001;
// Content Intent 用の PendingIntent を作成
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent);
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc8JX1UNhmMSZ6o5edmYomUPnT7YkCOsH5YBhEA5sBmOcfABbPbLuAocr5uprRUGzJ9Q58omJW5tciW_GPrHmxtN31VXFDE2pY3KdFfktsKtJqcxU2jpvquLtdN1CM1aij4HjLIUDRE53a/s320/Screenshot_2014-07-09-16-42-17.png)
Wear(左: ホーム画面、中央: タップした状態、右: タップしたあと左にスワイプ)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCGwIFmJYznJ8Vs8b_PEniwEG_oXse5YVgRB9HdZ30ebxVPqDUrrc5CpZPKWQ_yFRNVuvg-UBGO_jHyyy_7lNLgDHfh9VLGNKG8ChjUYdjJ3FxNYwj04GqoQ36YXyUa1uONwoRG13FRHos/s200/device-2014-07-09-164837.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyJPufq5_vtjB-UyXFZqXcuhcTmFE0HeS2RQUmAMvXZs5bzckLBtunaZmESj8CmKBK6H2KcsQwTNiSzd5BoKj5LLWuaUlTuZYI4cv45mm8bJ_BEaLjJDnM8TRdYMwvPb3ow66XHTOWOY1l/s200/device-2014-07-09-164852.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgTpTjgfR7UzYZL3MODpnLaummhhZdoa87szbgU8VIJPSd_lMdTTSFUF9CAj3NKBAj2A-pmVS6ClsIWZKR9jRlhW0yvjgtxhVlOJnJbQibCzch1JSMncza2RDxCTy2Kal0z7QgmT0UJh_/s200/device-2014-07-09-165908.png)
setContentIntent() で PendingIntent を指定すると、Open on phone(携帯で開く)が追加され、それをタップすると指定した PendingIntent が実行される。
■ InboxStyle の Notification
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.setStyle(new NotificationCompat.InboxStyle()
.addLine("1行目")
.addLine("2行目")
.setContentTitle("インボックス タイトル")
.setSummaryText("+3 more"));
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpVJlvTVPCee3aFf10n4-90_ZcIx6InJrtQKsPTe0MNcCU85pF9A9e4LYQsaOlafpk64LQBpSG0eox2Kh8bQwHHQtZpsMChltEvEp-r6pmpYQghY1yOFTzrg4g1wdv5-y_XY-Mj7qycjrf/s320/Screenshot_2014-07-09-16-59-51.png)
Wear(左: ホーム画面、中央: タップした状態、右: タップしたあと左にスワイプ)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX-OUPV-MP_GZ2nfXrchudAfytq4ZPMSRhd6KKJ_ckf-lpMba9Hn_u15e1ZJ2afi1wZIfmCLCUylzDn_S1fAXMK_qRBTz7owrkZzWiiZdvdKnjb3hX7W__yC4sXh_G3k0hfkDCyJ12ICXG/s200/device-2014-07-09-165823.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV-FEf00wFEFo5wg9xmv9yUBcPCRYAwDkEc2z9MW1WRDs30DDmKoF1zAFh_Niui7CrSyThsFWyWsEFztQ0a1xPM8r8MF93EwA02Bmht0COKN0Dma4wvHhDITzt9MB2avaiy11VcAGYzEVk/s200/device-2014-07-09-165846.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCgTpTjgfR7UzYZL3MODpnLaummhhZdoa87szbgU8VIJPSd_lMdTTSFUF9CAj3NKBAj2A-pmVS6ClsIWZKR9jRlhW0yvjgtxhVlOJnJbQibCzch1JSMncza2RDxCTy2Kal0z7QgmT0UJh_/s200/device-2014-07-09-165908.png)
■ BigTextStyle の Notification
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(getString(R.string.long_text)
.setContentTitle("ビッグテキスト")
.setSummaryText("サマリー"));
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ(上: 閉じてる状態、下: 開いた状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguthbuuj3c4RGzWqfwY5g8ANnO6DahfyKV2FjFYfFZuTGTHM6I3_5_ULu01fNasNo1ilUzwIy4pF9Sjzf7Ts73S14mkh2XQMgmk_fFM9ISi-sVhMcxMk_uRBZpKHs6gbq3Gk5S8PEeh5xx/s320/Screenshot_2014-07-09-17-11-18.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIxFUPBlGqyB6C9QzLF7z9VHMKGbgX3SLYuc_dkXu7G5pN_i6jti3st6vDt_DYEBFIk4oboUBWCHVNug2jhM1TDb6NkHJLyOGvnwgPhylYjC9OZVSuahlaY6J0g-EihxhaK_fBWdWU9Fbf/s320/Screenshot_2014-07-09-17-11-31.png)
Wear(上: ホーム画面、中: タップした状態、下: 中でタップすると全文が見れる)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXKDNctMDAqS-IDzg59D_7bK6xpQOZXobanyyaZG8-Rba3cJdx0sNl3Fe6yVmGXJLQWsgHIVHng2gZFwZSBZwTCrq92jBXp7uDKxztD_t4TJHAXTT-NJQv7uxV5ODNm1xVDc6MBkgMQlGz/s200/device-2014-07-09-170800.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_PtKvK3H1rCRh2xlGCb67nlP36cQ5jiXkI9pQUiYRU_ssBuMGG1yCt9OwXOR4ZD9eoy1sDuK2eq9wzt1fj3sdJc3u1LeymbBt5vglyiuIurIZ0bqZEhxPaxIvxyQDPClUoLrw5lvcE64/s200/device-2014-07-09-170809.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGDQggVbFX3eNoebunPZSE6hbywnX6aJ-aUDvUjUnealz7HFhrm8Mhp_ogJc-aGypf0lYPPagNHokLr82PclCztX1YZNO7PzUffPuSLyjnMK9jHlWbi-Wjp4X0leP79WjT4Ul3_k8JG0HF/s200/device-2014-07-09-170835.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIaSbN1z4oTTGMHI_2Tgvlos72WHvFY1JJDG9atoJVhwMdkpUU95ajgv-0wXt8O-0q7fgdVhQqS6Mv1x19Vv0ZXonJHHa46QOmiYzB7ScMHGhm4w22YEXCmgiZTGJp0SxH6wZr0YMCuw6B/s200/device-2014-07-09-170849.png)
■ BigPictureStyle の Notification
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.setStyle(new NotificationCompat.BigPictureStyle()
.bigPicture(bitmap)
.setContentTitle("ビッグピクチャー")
.setSummaryText("サマリー"));
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
スマホ(上: 閉じてる状態、下: 開いた状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikvCzUEoR1jNc7u-ThT2w_KoJpm6NrVnvOfClgDUMpEP0rE196dIklEtesmR2Ea_K8o6ts8hJRZ0tXuILp_xpuuqp9T4wpD5lrOOfe5A39zfZciaipMPT629GYsOOgbyutFg49xhIACXEF/s320/Screenshot_2014-07-09-17-22-54.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipNcy8vmx6b5wbLTHgGDZBJG6LSu6EKW3E-GZprTuG3zVWvhJWTd9lIj5S7nCXN7uHc-1-cx1ALbuBLTi-J6ugO2EIaOpVtiPpfw19Npyg-z_VGUbFI7fGnyozBEnJj1NrqNVnR9DP2rrG/s320/Screenshot_2014-07-09-17-23-39.png)
Wear(上: ホーム画面、下: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPCUkNrewi3Dv0KfsEEPLqlfkmQjwbuogTl1xe68BDYqMg7uTp22OeFuiDuEUa-IIL6r8Mn1ZfzLsw5G-g4MemaxJr13-aqNnWZ2fpvu_4y7i7NIysm6j_6i5uhSpo8WEVs6TTc4006NjG/s200/device-2014-07-09-172401.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJUXKa12JzPI1sl9HiXOH9NTPCYU00xrBfijkGXtnDP6QpbdSOQEoK0IIzsS47IzchYlv9TNOOhuFV7NXnIWDSxk6R_OBxWicHi1tcjH0tETTIiGxto7pAgYyWdpoq7wHTLPIMQtB160Pq/s200/device-2014-07-09-172647.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJsgZGLrj3MI-oJE4IOwvHhyphenhyphenUTcXmnjFVoTGWml_kG6ub9MhMa6wRHQu-Bd_wK-XQ7nSqWftysZMmO7dci2lvZCXwtplRcZwntWDFUDXiOO2ZQ2GWzinBw7oWvh31KNVtkU145HDUWg10O/s200/device-2014-07-09-172654.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPjiJrgcOwbtBpKweXgbST_ZpDgtiYpALDCyz1imAIGb1RppOJLIJfM5_YGEWnnJspWuzsxJtTqrSZ760CMtr_r1sB8MAmH8gvXT1P9_RyvcCdw_XWV-aycf_0rBNcVmBcGyDgrIaGoeQC/s200/device-2014-07-09-172700.png)
bitPicture() で指定した画像が背景になる。カードがなく背景にセットされた画像を見れるページが追加される。
タイトルには BigPictureStyle.setContentTitle() が表示されるが、その下は setSummaryText() ではなく setContentText() が表示される。
Action ボタンを追加する
Gmail の Notification の Archive に相当するもの。
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCifE6mXR1LvU8hmv620YobU3ExZUvQFNE6mc4Zikfub9zUFV0OxwN235vpSP1udJBl9uoA265Nh_lTflGQ_w76MQ1YwAOBDzf56Y409-TMhyg2DGirPvMRtuTDo_Xn0mwKVeholQgzFt7/s200/device-2014-07-09-212622.png)
*アイコンがぼけているように見えますが、実際ぼけています。Open on phone と比較すると明らかにぼけています。
NotificationCompat.Builder の addAction() で、画像、テキスト、タップされたときの PendingIntent を指定する。
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
// Action 用の PendingIntent を作成
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri geoUri = Uri.parse("geo:0,0?q=" + Uri.encode(location));
mapIntent.setData(geoUri);
PendingIntent mapPendingIntent = PendingIntent.getActivity(this, 0, mapIntent, 0);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.addAction(R.drawable.ic_map, "Map", mapPendingIntent);
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
addAction() の第1引数に指定するアイコンは ActionBar のアイコンと同じサイズにする。つまり、 32dp x 32dp(内枠 24dp x 24dp)。
Wear 側で表示される画像は、スマホの解像度に一致したリソース。スマホが xxhdpi の場合、hdpi のリソースがあっても、xxhdpi のリソースが Wear に表示される。
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8yKpk6wev6bJ11p32WIO5B_67QaDeuGkF3rr_7I5zN4qqoqIJbuGUP4m1yF4KzMThhW43hyxuTk0wtu0eON6Gp64NL6DthIKnEJZu-jOxT5QIC1HmwE-_MEx4KaBAq8cXDy93VfebpzRj/s320/Screenshot_2014-07-09-21-52-24.png)
Wear(上: ホーム画面、下: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3H7kD9csFbVMRh-nPjIm-CriDgQSNFsTnAip_AzzQBwf5n449U6BiBh6cTU9JFmI_n2TxmOA8VGHz7K6gwDbpInwNEYQ19YeEQ3CRQR_41PmaP0B_J3W4x45d6QBTSaDcA4PUhYBHhVhi/s200/device-2014-07-09-215240.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihkHd_QxY9HHwXP_Tpt1gwQ8BxNER_W3AZrE1J9nmZYSy1slJzFi88qGJZOhyGvl3kC19P19ElRAf7VugM1ZDbNgYMerZ70aGE76UVaXnHDsCjMKZTmNGH0s9SW95Egm0ezL3lW5_WKs6d/s200/device-2014-07-09-215810.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmDveRKbdb_ZuQM3KMM34z-7LgIevHgJmVkFSrnWCmuNvSKWARL5RQLFsZ9YipruX_g33meSHARMVULkQmt_0gU0q4UQH29blJ4o_UFC04XQuMcRACDv5IyAIiiIQ8589Y5p-qOxcWNXK8/s200/device-2014-07-09-215818.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-pj9JSezKarksLnqfCPdAsgb4Xaoo5M4YwS4dz-wvxYPDpUhjYSwR7ea1vF2nl50SObOdtfW1rZunUBa7HMlwYbjd6Nei5I7d1KNS3ng7fbHBJ9pKFyJfkNrau9nNP7-zdFqzrA8DXHOj/s200/device-2014-07-09-215825.png)
Wear だけのアクションを追加
Wear にだけ表示されるアクションを追加できる。スマホの Notification には表示されない。
WearableExtender.addAction() を使う。
このメソッドを Action を追加すると、Wearable では NotificationCompatBuilder.addAction() で指定された Action は表示されない。 そのため、別の機能を WearableExtender.addAction() で与えるというよりは、スマホ用に NotificationCompatBuilder.addAction() で指定した機能を、Wear では Wear 用に適したものに置き換えたい場合に使う。
例えば、Gmail の返信機能は、スマホでは返信画面を開くだけだが、Wear では音声入力の結果を返信できるようにしている。
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
// Action 用の PendingIntent を作成
Intent mapIntent = new Intent(Intent.ACTION_VIEW);
Uri geoUri = Uri.parse("geo:0,0?q=" + Uri.encode(location));
mapIntent.setData(geoUri);
PendingIntent mapPendingIntent = PendingIntent.getActivity(this, 0, mapIntent, 0);
// Wear 用 Action を作成
NotificationCompat.Action action =
new NotificationCompat.Action.Builder(R.drawable.ic_map_for_wear,
"Map for Wear", mapPendingIntent)
.build();
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.addAction(R.drawable.ic_map, "Map for phone", mapPendingIntent)
.extend(new NotificationCompat.WearableExtender().addAction(action));
// Notification を発行
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, notificationBuilder.build());
Wear 用のアイコンには Action Bar の2倍、つまり 64dp x 64dp(内枠 48dp x 48dp)の画像を指定する。こうするとNotificationCompat.Builder.addAction() で Wear に表示していたときと違って画像がぼけない。
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVyrasD9I8wOF0ecSdV-z2YXm7RJo1oNmhNEq2LVXo4wQEDkxudTQDQdT7mCkzaetYrFnY1JSNb9-Y3unHolFycbiHW11tNPShNeil02LTsFiBM2rM_hlqW66ZOHjmxtELp60FEJJ6qNo6/s320/Screenshot_2014-07-09-22-25-38.png)
Wear(上: ホーム画面、下: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLQf4ZY74ZAYz2Yucyn6hvKB6oM3QtqXdyt4kIFdUWU149A4oiHkIdc6KPnBQUEB8Dmi414oH_di6KqHp8E_0wDFZDkzY2vt4x5w7HZgUSLb785LpYRb9hFappvLG0pKlLjD95OXzq21r/s200/device-2014-07-09-222600.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxsu9BItFku6aNtHieFaBDQO0F_FRsPG2nXrMZRLMxqCbSTsEfOtpBnIHdsvGKtK9JmJK8sbzluZjjOP-53yNKRjx-0rM6_2s824BDs7QGT9ONab4NYdK9S9Wgbjl50thXxVKSHFX4iH_m/s200/device-2014-07-09-222616.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDqjiyDPo-s7JDY0Yu-7IJfWYp4Fq5D_T8AsB3DiJYLJ9C7TINEE9x_I9b8MAn-B9l3pTxer596HDmEhKbWH1b5gmyWRLw6w9bQj0FfrjxPWRCVj4o3GKHnsv_pX_pw5PEZmsgSrwgz260/s200/device-2014-07-09-222621.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIE-nyelaeXDr3Cw_zhjv8n0msGjn22NXxbDu69T1IOTcPlr0Mq4jXmBY7zJb1QhsCA-BuqXPDaXQuv480OQR3oNiZ3DqJvgOfBiV6L1Bd6vw7d0CjMcqJGm9MVO_khcT-16Q5dlR75gJx/s200/device-2014-07-09-222627.png)
背景画像を指定する
■ setLargeIcon() を使う
setLargeIcon() を使うと、カードをタップしたときの背景に利用される。
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.setLargeIcon(bitmap);
BigPictureStyle を使った場合、setLargeIcon() を指定していても Wear の背景は BigPictureStyle.bigPicture() で指定した画像になる。
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlJpzWJzYdJgyVD5XwaQ6JijdVxXriqPxCKkzCBkYpjIcmcoWL8BUwvrxszKYUDaMIpEUqqoA-nn0r-sSm5otCka3fn6D1EF4SZ0-WLngTZegO122p5P__SABBahSt990rcncWt_QMIlFS/s320/Screenshot_2014-07-09-22-34-17.png)
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl_e_gdD_mm1sTh1Do7pwStOoO_u7ABAJiL2mOvrE9uAkMf4I2IaAyBjcbRJMWa2Gms0qksT4Se7SWy3qj50bbQsGSGjm_8AaAAYPtj6vLqIXjrOCdTgOg-Yz2WDiwDjXieMSfPdyP9hp2/s200/device-2014-07-09-223439.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJYBAax1BI8P3biOExPEFBAXd6UFilQkEGtKi1u_V020qkGArScMBX8bSATnO9soOsXiHwve8xNiS1bT8YwwaFIkDqoJb9MCSlcbBQ8f5hhSb-aS4lxSH_VPvNi2eYHILwh9Fk6j4nC3p/s200/device-2014-07-09-223502.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL_p9Eh52hbCNd7NLF87nCA8zG4ohMrkVGUZIqOIErcz_E3jy0GEjZPDzkvKXP1_ZMXrxQDjtQ5m6ib_4E1nJ-FNWQQfxjgaCL9K1O4NsDR1hBPrso_4qGpBim_NKgJ_Pi4ohGEOKhFkQV/s200/device-2014-07-09-223510.png)
■ WearableExtender.setBackground() を使う
スマホの Notification で LargeIcon を使いたくない場合は、NotificationCompat.WearableExtender の setBackground() を使う。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setBackground(BitmapFactory.decodeResource(
getResources(), R.drawable.sample));
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZTYC1ufDsjv9LWOM6ZLH5PBmdYOJ04RlXcK8v7clnHJXXj0Durc9G2poHI4lcMcr6-X8eJD7gI98o9FQGsXYUKc6jw0xgCWsmcz1reSBYXU1C5fo6FfM3d6nIn-ojaHfeE91LIKFTymxd/s320/Screenshot_2014-07-09-22-45-16.png)
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNs3QOzn4W6mAPiBjEoY0N-_qEwWH8jjKkP6OpFlPEKSWYTK3taguwJXmQgBzyQDilBxm4FCmy0Ds4iHQDucmTwsfXUsQQBgQKBsg3ymXwenY4N-s0vFYKmOafcEpRJCQfFjOXsEcqk6ex/s200/device-2014-07-09-224527.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChoraM7DlvuhULr9hcbqC4OLmLwe6wZTCjj9XAnrTcpXRFjWoe4Aycn-qFqcGJbs-1dsqonVzG9qcU3a2StPhfxnpsGFDLALJ31qygCsyoblONizDX88vlpJnL7GoYqhZVnqTNtxuYwrr/s200/device-2014-07-09-224534.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHaAtWfjuTx7j16tBhKxzRRTV_635FTEW-0S9wF_3jNFJ2FR2YwqjfA0l7MT8ufp0Y4PveHj8mv77fu6uE2qtcQ7lYEsPPQNxDAqCpb5tii_hugTjDedxKUfaydnCALP2OtxRorSrz-Bxe/s200/device-2014-07-09-224540.png)
Wear のカードでアプリアイコンを表示しない
カードの右上に表示されるアプリアイコンを消すには、NotificationCompat.WearableExtender.setHintHideIcon() を使う。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setHintHideIcon(true);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK_DOesBhqvdimiuLuWSuTD4m_QS3lhmJIXvt4MlMcARwKZ0oDWZRX9YxGlqRElWX2uCIcG-QMvyk09WP30T3gYuzBgG0ooLsNwj9-mIGY8seiGEz8I5sZtBTbmlDwBAhJTiKdFVD7s-81/s200/device-2014-07-10-092152.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEJzrSUKLvHjKUAXG-6qieroHY4_-ylPE_Y1juX30gFVAdg8ix527oje5Uohpz8o-TdpbCEQXP2dWgF4nFnrQgDKZoTYDaVuR464lNrWKKXjC2TwwayM3vriwVPmSjDjMzwzl26tKiCcqp/s200/device-2014-07-10-092203.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9EKoG69BI1dYIIeoHAy8icSzAhz51Cp_V5JbElvuwn3YsP2BUjWl9V76mK6zKahCtLIz-icsBWqqRkxv-TeC7TL6h1W5MIXW3lOjibly5QTF_NfPQ5rTz991kRKk2emM4kYa-qC89kBYC/s200/device-2014-07-10-092211.png)
Wear のカード内にアイコンを表示する
NotificationCompat.WearableExtender.setContentIcon() を使う。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setContentIcon(R.drawable.ic_droid);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
ここでは、アプリアイコンサイズの画像を指定してみた。ambient 時は白の tint がかかる。
Wear(上: ホーム画面、下: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJkW6Nbe8F62mbMM28f0fVkOOsZ-eRnXgQ9hXZpiKF9k3gIP4skiVqrWARHR0eawlH3enguwQQRhUkbUjTmkdnhFQzqjdWg62A7uNT-QtIgp64b6uiI1p9hzaWju7hDDGyBwtyG4OSFm-q/s200/device-2014-07-10-094012.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjujTSO6ZrPI-dmCXzBY1xOB0S5_52CM6mRqKZ9kmkBxYSzPTnCht1tDwzJoFwQd8UlczSR2Bb-pxCr419eshsoWz5pvHa5n24e4L4bs6w3qIW4EhVCsKupHqA0tcAG5k0PrcY7H60I8EcM/s200/device-2014-07-10-094019.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD4TiPmWFm8Nc_4HSs3MFTOu1S3qrXJC-mWXpyYCuNr1GHNlC-Rxkokx_tDPeeR9Lk3X_SFHj4pTEv8Rd8i_FS0fY0GKQPySN_1_QCZnyhzpoeksLK0-4_WbMd-eTYLAdS3fPbN9JbUhfu/s200/device-2014-07-10-094028.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiymc07N0Gw5D_72hHyO4kANK4I8UbC-GVjXw4Y_vAaECk5SmTfBkvvxi-mGuJHvUgysKCvzq9Z5WotMIpEKnxznn9IeOP1ST8bX4LWa8Cu1Cwwb06U-XzKkYkz3VoRG62kq65SbxWFiO-W/s200/device-2014-07-10-094033.png)
Wear のカード内にアイコンを左に表示する
NotificationCompat.WearableExtender. setContentIconGravity() で GravityCompat.START を指定する。 指定できるのは START と END で、デフォルトは END。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setContentIcon(R.drawable.ic_droid)
.setContentIconGravity(GravityCompat.START);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
Wear(上: ホーム画面、下: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga7nnRJ1SeV_f2M2-PXMltseDIjydHgTf8B3JDCXU3qrX58ieCUZzkSlB-EqoItHgcVg6h3ZRpc2WFg6OcnICkTaAUcrXzbR0Bx_GQg4Jr7a7_dLI2A_2GrjvFQXgDHSOdsoODjp7hoB8B/s200/device-2014-07-10-094502.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdP2i7vznSeN58R86iChYbTo2XTW0ia6IWwVBI51zT4Pcxgsn8BvAzb-_P6POFa8dYsIS2aWom_gqhqMeu6pikjLyBwo6UUn8FN94_pZokZq9O3nJEZrMu4etL1O7ft7cEiV6zqEgM7Va_/s200/device-2014-07-10-094456.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZgEHAbDIKX4_aMleHvRHzkMSQcPMJ8ZfG67-b2umxkSNY5RVeZBxGId8TMu3cvrAiBFm0RrY8HNuILk1Stz77MvpVAMc9qotU0Z6TQHrWLxQ9Zd7qh7TM9UkMxRZVsj-GygamU8UxXc_G/s200/device-2014-07-10-094509.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRu-HqKH8VYBZDNcF85q3baFupdgepAhjbOX47dCPAfbniQmI8hP7LG2N4PoVw94YAwYcCT7dE8iFeCuruZSQHUOYXzriAkE71IJipCnqvIZcb2MY86LGVzmVuTcpMUJvbEvP3_hw-5HMv/s200/device-2014-07-10-094538.png)
カードの位置を変える
setGravity() を使う。指定できるのは Gravity.TOP、Gravity.CENTER_VERTICAL、Gravity.BOTTOM。デフォルトは BOTTOM。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setGravity(Gravity.TOP);
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
Wear(左: ホーム画面、右: タップした状態)
Gravity.TOP
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKBvib9NSNtTKRCSJoKK2fycmbfPpcEEkxdqjnDWC7a3vIrz9QqcvSVP92feu6tFv1POjmTik3f35Nxixk1lNDte3f39KoQ6y6wKGUaqVeeZ7zwLERP8c9SnXD-MzzN1vTveccFSWQFd8r/s200/device-2014-07-10-114442.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiflSJINRIqwM7Je2a0OfSGR31S9k9srYMW9jx19zt4TyHgQsmaENNHt5PZHNLGDt2pMCMjozYYXb-ovcKgi5vY1upfQ1SvMwxYkpMkg4YZxWx6HCiSM9uKwmKusTSNaB1IgNMNKNDy2hrn/s200/device-2014-07-10-114448.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9VL6AGbOp0zAmQqefgkh8OeQtoKctG0dEAqPxjc-wabtTkJHNjiG9DMDScW9mmekChn-DJvuKkvs3QULtr7MUbxnO6Mpbdd1JXbDeZ2_kfzqIo2pjJhEFTOWZVzGB4nrj1wg-leK8oBKp/s200/device-2014-07-10-114454.png)
Gravity.CENTER_VERTICAL
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKbEcUSXQOX0ZxnNyasX7tLYUULMQ8JyovjGgODSXQ38agq15vrnlBea8UnX3e_h4EwyioWzMiP065oIg6V7RBmAt7ACZmRvfOBxuLF5kOS7B-LAr0m5lAv0Ft88l0IhEB945YdDD_6_5v/s200/device-2014-07-10-114302.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaVB4nbRGdlpgWHqMuxBkBivb1C-xAVPPe4_D-hNS25mSYHh8W3BZyiBXo75pvjo4G96l9EAoEAs9cleAy7SUm-D5IUmsn3nEjAO9OJwEBGoE0gcXpfNmrf5kj_HP-uBhhn-4PRj6o3DN5/s200/device-2014-07-10-114401.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbQDLVznGYFHixUga_SpL11ZMfz4Kh_ocFAXjs3-LUK2AuOiKyRk5zI72-QrlLcznNr6r8zKcqS08BOxTqb8BaYRk4Sseb-y9krigxZ99GvRtBrQO-gm_nGW4o8K7Wj0YTcuJt5fCKue1b/s200/device-2014-07-10-114406.png)
オリジナルのカードを表示する
これは Wear アプリから Notification を発行するときにだけ使えます。
setDisplayIntent() で、カードをタップしたときに表示する Activity を持った PendingIntent を指定します。
Wear 上のコードなので、NotificationCompat ではなく Notification を使っています。
// この MainActivity は Wear アプリの MainActivity
Intent intent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
// カードをタップしたときに表示される Activity
// ここでは ImageView 1つだけのレイアウト
Intent displayIntent = new Intent(this, DisplayActivity.class);
PendingIntent displayPendingIntent = PendingIntent.getActivity(this,
0, displayIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setDisplayIntent(displayPendingIntent);
Notification.Builder notificationBuilder =
new Notification.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
NotificationManager notificationManager =
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(notificationId, notificationBuilder.build());
Wear から Notification を発行する場合、setSmallIcon() で指定したアイコンがカードの右上に表示される。
setContentIntent() で指定した PendingIntent は Open(開く)という Action になる。
Wear(左: ホーム画面、右: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYyHplk-oD9W3BC6SkjZON7BAHFc9ZxLz89QsSOCPTpR5yox9m7fDGU6-Ps_IjZ4_ogAIToRLZSdfqHqXqrPplAPwY2Q5BekyZZuA_ZPKaCLW3MRDEAxbwH_Ht8gC-xr5sNOggTmqjzItf/s200/device-2014-07-10-111836.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4SFns8qM5wSq9aPHLqqYHh3A1mDVZXGyp9wxPxDFZGNYO_CziY1qqn_vW9LPghHQfNNYnAU71QWk216_talbVybGNZDL8A0-X-49jbJSYNhjtxucz2QoJfYmfdEOrnu0uCZEAzEJJyipg/s200/device-2014-07-10-111851.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsJIvo07BXFH8-R9OSi6RrIYRGDieYa7L7wdxX8m5knivkVidfZdyAtowgtluORN_N660tB4bmIhISWEKLikwrKi-Z7oIYzoKggdQo3NVowaRITProu0-8WGERldlOnRFSMPUd-IPf4lbi/s200/device-2014-07-10-112008.png)
オリジナルのカードの大きさを変える
setCustomSizePreset()を使う。
指定できるのは、SIZE_DEFAULT、SIZE_FULL_SCREEN、SIZE_LEARGE、SIZE_MEDIUM、SIZE_SMALL、SIZE_XSMALL。
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setDisplayIntent(displayPendingIntent)
.setCustomSizePreset(NotificationCompat.WearableExtender.SIZE_FULL_SCREEN);
Notification.Builder notificationBuilder =
new Notification.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
Wear(左: ホーム画面、右: タップした状態)
SIZE_FULL_SCREEN
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVrSD5G5LVm6SrmLKP0AJeQ6SreEcEudlVVmkAkGB03EWbtwgY96ou6xH0wzTu8eBWDSo9tFS5LRxG-EecA4hy1JZCNuzyyhqY7Zhl8F9f9z-Zl0fJh4VTz7fnQ74caAWaCP55A6Ex5OT0/s200/device-2014-07-10-112751.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIz5Gd_HYP940IY8KadvQ79FxzeId4qrjawY_1RW4loF5R8DiAmFiY1nCVw4Br9jLaWgBuoQKzVs01YzpzxfynRKfYcifEERogh9n8UGome-oWZNqiiZ-sj_Bvm75ScJtmckyWf6MJDHY-/s200/device-2014-07-10-112758.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjej0SMIb-11BZCpc_zJ1NQB7pOfEoY5bW3igmRsKfNwScLBY-ku9_ky53ehcJZTeObQdMs6lXqScIzD4nurKA5SDywPT6yocCJ0qRsVrmKPjnJlVnfEopKwtQbGTPTIY1WEbZwfjgpaY1B/s200/device-2014-07-10-112808.png)
SIZE_LARGE
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhQHGcPtpizaXiuU-6sQZWVQSaAKHqkdp4SXhRgtMWgPqyYBexzqnnnumOBgi8cXYL8_tLiylY1vi1zajyVGY8PwROjf3SMrj-A4TiKnAXrmYEcxJEh28zztAPZFjkjAbK5UreISeAQBph/s200/device-2014-07-10-112902.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_J2WOclIEC14fYYuoqG5RVLI1wtMXDUHEwPbr6KaFySbPdVUPcN-qgz170xddfQ3BE1clvPZ-lCkrafc_m9dWscExktBc8Z5WKw5-yYULWpVJF-PXRy_Ve0lD8kU8-yf7zciWEaVlGYvh/s200/device-2014-07-10-112912.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF-wS8VQZ1OMMspDHEHcwDFNCNqw7TZCFWdZqlvcf9-W2S_cdARZqxZEG3r0TvIm_CSIQOCgB3OGIuD-H3UxjiYF_NctVG-MZ8lQtLCMZ7-2ceHuOK7zqu3ynP9inePUh3ZgrtFqAw-ypm/s200/device-2014-07-10-112921.png)
SIZE_MEDIUM
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb5O8LLUhlFv-w1VInm6NI-A_eM2esKTEKEgnU6gUEiHeaygR_ESauCMoix6p_p2ZgPj0Muu_9J6b2SqS1DaGNeDQZoukaQ5iqRnPRMMW5sm9AJ8P-MziKYXRGIW1Z9vdLvnp_TEJonEpr/s200/device-2014-07-10-113042.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkoNYShIAusQRFO-cdCRVEvSY9IoJE4OjXVGXA6AyIggny_bcH36KC16WmbBADW7hh1azjNrkvBRs2PUU0PqNr9yBqaAH-qvfUzrl-hd7skak4gEBGsLf_kFrHkux0cS0rtBjpdV1Yc5RS/s200/device-2014-07-10-113056.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio6dKHNWhSNqGIy2J-rgf8HMY5APNOnhRrKX3FbGLFSRKULD52TaqyADhNA5m_2__JYpkURrpMBG_8Nz1pIZ9MIybuapzmtQvtghXC66vPVVOzjU0_ylWQB5G9nWkBbQ4RodMObTADlXI5/s200/device-2014-07-10-113103.png)
SIZE_SMALL
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy7jTEVNwYvkmTJemQtbaTxpvbU2_aHrOsMazqTx8HQICH3yVYInO-xaJ9PgXNE7_3FzSCzskPa66723KTvkYM3nYoHIwSGaiDcz2zL8ob_fiWgNwtEPH1oLgXReXp9n2MUE-W-0_-erSN/s200/device-2014-07-10-113217.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkjIKlfngdZXoS8chrg5dDZPvYv_XPnsZ-Df7x65VGRmZR0M4-cd-kzdMkyezg9KL_mg0CfN9qqubCb02PNqDSh_7y7MhaQu3MZATYcav97tFEueN46xIjVvJgcxz_-FEsYyoo4uzhXkjG/s200/device-2014-07-10-113234.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizgdfpKmAUcpFzkz5w31-uaSCn4B4DylnhwCUBl8qnWw4726x6LfHo13IvaKEqS9D1PCBWQzqpIlBmr_k-xR7y9D4eWZxGK0vh5salwX4o-H6swnvZ1OPkGhygmFOcst4o4UQQWnUPChU-/s200/device-2014-07-10-113245.png)
SIZE_XSMALL
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmCWKg8Ox59ycWGXXvz-ydj0EB71J7hY_ivZtQbE9P0RbZ27p_SrU69dK5tnML4CLe-icxWWi5rT1Xqn8xos-In8KiUzNn6yVdgUF-lbqmau2fXoTuGtnFCQMq-j0BW_zbppClep8Cf4ql/s200/device-2014-07-10-113342.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1km-NtKuB_GoXIWdWUMjgSUAnz3h4d1fst7Y4lCmJfraE5aQoymogoluOb25eao2KWoLFaO_Lm6-5vyAGFoLEp-uKw_mLTHbJ77-aPsNuLIHs1kyZiCCbrsrpcb0y5yB5nSM8cmJevavF/s200/device-2014-07-10-113352.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQXkWS0zp6dnEuiL0e5BxQzd-6-iAVXD_LheGOKEky6GP-PzZvuTBOlfAX-Sa-wN-zV2tv_PeKfvASqrGNsRQt0MLOgp6ulMTmX5Bwe0q1hWj1Imy0KcqjniCOumoq6bhZ_jn1Jy3XI2Yv/s200/device-2014-07-10-113359.png)
Notification から音声入力を使う
Notification に返信するなどテキストを入力するアクションがある場合、Wear にはキーボードがない代わりに RemoteInput を使って、音声入力を使うことができる。
*エミュレータには音声入力がないので、AVDの設定で Hardware keyboard present を有効にしておくと、代わりにキーボードで入力できる。
RemoteInput は RemoteInput.Builder を使って作る。コントラクタには音声入力結果に紐づけるキー(文字列)を渡す。
private static final String EXTRA_VOICE_REPLY = "extra_voice_reply";
...
String replyLabel = getResources().getString(R.string.reply_label);
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY)
.setLabel(replyLabel)
.build();
setLabel() でラベルを指定すると、上部の青色部分に表示される。
複数の項目を入力させたい場合などのに便利。例えば、"Ok google, remind me" というと、About what? と When? を別々に入力する画面になる。
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCe8T0KINrWxyQwTuml1O_Gw9nLu8fkhaVjvvAUFxcBvnkpqkfNOIAuHgDUyd0LUK0cIiyOqS0rQivoomasHOdtxJENwdNthsqVSdwxQJxVVi3QK_PquYTI_8BeEqL54RBF7lWbMMofVKc/s200/device-2014-07-09-150733.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLzqAzVxFesvN0WJxtS3Kq_Tve8mjc4eYwMejFWmUF4HxUQmfILLGcMFNxwbGt81e2SXh1B0zW7R84tp_A154_siQaAnTvxDoqP70eKgadMSeXqwbag1X236dm8_M2rUnpHwbucNki7SQL/s200/device-2014-07-09-150816.png)
RemoteInput を Notification に組み込むには、NotificationCompat.Action.Builder の addRemoteInput() を使う。
// 音声入力の結果を受けとるための PendingIntent を作る
Intent replyIntent = new Intent(this, ReplyActivity.class);
PendingIntent replyPendingIntent =
PendingIntent.getActivity(this, 0, replyIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
// RemoteInput 用の Action を作る
NotificationCompat.Action action =
new NotificationCompat.Action.Builder(R.drawable.ic_reply,
"Reply message", replyPendingIntent)
.addRemoteInput(remoteInput)
.build();
// WearableExtender に addAction() で RemoteInput の Action を追加
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.addAction(action);
Notification.Builder notificationBuilder =
new Notification.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("タイトル")
.setContentText("メッセージ")
.setContentIntent(pendingIntent)
.extend(wearableExtender);
音声入力が正しく終ると、NotificationCompat.Action.Builder の第3引数に指定した PendingIntent が実行される。
PendingIntent に指定された Activity もしくは Service では、getIntent() で取得した Intent を RemoteInput.getResultsFromIntent() に渡して Bundle を取得し、RemoteInput に指定したキーで文字列を取り出す。
/**
* Activity.getIntent() を渡す
*/
private CharSequence getMessageText(Intent intent) {
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
if (remoteInput != null) {
return remoteInput.getCharSequence(EXTRA_VOICE_REPLY);
}
return null;
}
* 音声入力の結果は ClipData として保存されているため、Intent.getExtras() を使わずに getResultsFromIntent() を使うこと。
Wear(上: ホーム画面、中: タップした状態、下: reply actionをタップ&入力した状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0-vR-TUpoCeWnQ3MUGj9dCD2NygLOXiOcth28SoBIuJflg1DjPiA9Dmi6XOsZBH4S2e4q3P1kCMCp0MSrFYYZyzhCkOef9VqYnYvBqUM9UNed0RlVnevGTn5Tuwd4i_hRWm2FNzArufY/s200/device-2014-07-10-132555.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQB684EC37cZQpjDUbR2zUdDXJCafd5GUbhB_f5fnIEk2Ye1U_uHr4OaxkKbqIZK3TGV_TIAcMJM-xYCtjhZ8R4cW4mncRNqeljwHE9c9lBTKsqQLNiCl4UWOktvI5-ZcINdiWE0gKt-hT/s200/device-2014-07-10-132628.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMjnxkNC8c1PXfVN4-qNgN4eboWnZ74PEKVUHdvUKyN0451uxxMT6q5sN6mdT3wbPF9l0hms1NlbJ7vKbZriuRBgSHZr3K4MkEHQ7gJDag7fTkXk6YMiHSum_3iu6RHAXOublvznvuaUEz/s200/device-2014-07-10-132633.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMMF2J0qDAjYS7R6UUdoarbYxKilq0LhWtYVMdlm1hmRgqJsP3ODiEQVofX1l7CZ5sYy_qyuRh-HDty9gtz61aP0z7cL0ebfMVA9Nr6bGL7Z-4L6HiS8IshqW4XAiePwqMwY6OEqEM96v1/s200/device-2014-07-10-132637.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgpDkHqkts6u6t6Hs2xmq8hP4SVbaauCUf-Ix8ROvZ9dxIxPxy2I7F2ULplrDd1SFvTyXU6ML0GOT2766t_o4hTC-z3-A-qkRfl_FMb_-G2jtqxy3BeC_Cv2MN3rU4wBNPhrCNcU-Go-qu/s200/device-2014-07-10-133613.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibjqsgnVoZyz_EzMYMPTW3x3cEhZQi-inyPM26sTxdENJ-4TDzUEsuGwYl_JBLKxJ-ZGwCp6fQUeb9z84b5XKvNpOARp5r-Z0vEAhDr8TGYXC4NE3JGXZwmp9PR7wTB_RRQ4Yxy3glT3Ir/s200/device-2014-07-10-133622.png)
setLabel() を指定しない場合。
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvo0q6OpvfUHDaQPvwvaNls8uU1c_0yVNYUe_Vqi4p1OqEP8S_J7FLjYd1CeZnJPuPSfe1Ac-iV0p4OEKgnpwEMhh4Sx1g5Ar1aQV6PfZnteJXnijyiBRycZp2A84oAbWRvCU48zFZ8VI5/s200/device-2014-07-10-135503.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXawdWkvEKPfIEsJFHu8UwAiiv2pSi4NA1D4ig3XXRQXn5nDyyVHw48Kt2Qe0tQCPTZ1QIgAIhN2tVN2EjkmfTsqqL93TLEaKrr0vLCQpIyS7bCbtM9p31fpMed8hscq_m2STcJAbVUdfW/s200/device-2014-07-10-135627.png)
■ 音声入力時に選択肢を与える
選択肢をあらかじめ用意しておくこともできる。選択肢は5つまで。setChoices() で文字列の配列を渡して指定する。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="reply_choices">
<item>Yes</item>
<item>No</item>
<item>Maybe</item>
</string-array>
</resources>
public static final EXTRA_VOICE_REPLY = "extra_voice_reply";
...
String replyLabel = getResources().getString(R.string.reply_label);
// 選択肢
String[] replyChoices = getResources().getStringArray(R.array.reply_choices);
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY)
.setLabel(replyLabel)
.setChoices(replyChoices)
.build();
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVfiBwmkdPnQyPIruqTigDMC2DWf5AAgeOM33P65L5n01n0ne7h-StTztUPttFaQv29ygAoC8ihDnCGBNyyeeQFGnkQ8Y7xglERjyn16tvA74qCRhgnZCvE2MkF5NEy4-1OHTMPpHjR_4N/s200/device-2014-07-10-134207.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3e7QCfPkkkVN418JK1qg7z2JEQgLeRHDimsFmQkdln3kI5O623HxmHBawyQwgjpEQjQlvadomRxekHPVIDNM4FsZFBLTW3BKjFh0R96HNGdPUVmvVqCr3Snlh8aD6yand3ovkcHr6gdy7/s200/device-2014-07-10-134213.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSScHqqo-twPC4CTotRl8OPygK0sYvQsyklijy7c0EHTCe7EVxXY3laFXyM2aHJvtYqm_XxeoVi1kKY7pfdqVv39Vt6mOb9HJ8enfgxwtlhyphenhyphenAWKaejbcKwwfG3kh8J5bKDjDQS3N3pApE1/s200/device-2014-07-10-134220.png)
■ 選択肢だけから選択させる
音声入力を使わず、選択肢だけから選択させることもできる。 そのためには、setAllowFreeFormInput() で false を指定する。
この場合、setChoices() で選択肢を指定しておかないと IllegalArgumentException になる。
public static final EXTRA_VOICE_REPLY = "extra_voice_reply";
...
String replyLabel = getResources().getString(R.string.reply_label);
// 選択肢
String[] replyChoices = getResources().getStringArray(R.array.reply_choices);
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY)
.setLabel(replyLabel)
.setChoices(replyChoices)
.setAllowFreeFormInput(false)
.build();
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLyi8TK_IZd-gaxFGEb3lc-86CwWdXmzClb7OdV8n_rUnKHgKL5vlakZ5SnTJaqj_Txfae0gHZLqkDA5MtfRHTfI5xYrt9HRTuiWwhRO5pbU_6WtNVgfPW7AiPCi40Cd5_dE6at2mRL4bt/s200/device-2014-07-10-135319.png)
Page を追加する
追加の情報を表示したい場合などに、Page を追加することができる。
例えば、ハングアウトのカードでは、メインのカードに最新のメッセージが表示され、次のページに最近の投稿メッセージが表示される。
Google Now の天気カードでは、メインのカードに今日の天気、次のページに明日から四日間の天気が表示される。
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdYL_Md1jo2fAtehSK62enxyJ0cz47zBEeCtfUJPAMjoJ0I2h04mUP9DVJx-lKQPbF5CmE_-F7sNuA0DPpJpAv84Mb3nqTGlis6iNjiVKUBt_w5S1HiUtEewlEiqsacc0ns1ufWv11mq5u/s200/device-2014-07-10-140255.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi6g3lo0Y9ZAVbIL2jQefTLisgc10PmNXM3ik6vukalHPwhy-1KmMTNd0dVmwjbrTLGL4ehzidFOKV9f3IR7p3a7csoigB3vaaz4O6loyiz6SCfMKTQc-q0GgOaoW_MVoJpaLOG1uePm0t/s200/device-2014-07-10-140300.png)
Page を追加するには NotificationCompat.WearableExtender の addPage() か addPages() を使う。
// メインの Notification の NotificationCompat.Builder を作る
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notif)
.setContentTitle("Page 1")
.setContentText("吾輩は猫である")
.setContentIntent(pendingIntent);
// 2ページ目の Notification を作る
Notification secondPageNotification =
new NotificationCompat.Builder(this)
.setContentTitle("Page 2")
.setContentText(getString(R.string.long_text))
.build();
// addPage() で2ページ目を追加し、extend() で1ページ目を拡張する
Notification twoPageNotification =
new NotificationCompat.WearableExtender()
.addPage(secondPageNotification)
.extend(notificationBuilder)
.build();
// Notification を発行
NotificationManagerCompat notificationManager
= NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, twoPageNotification);
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0DmN_9gYlzCaKOBSEt1tt45WUJnwt6ohhryF-b8cPL-iI_hMrBd_j8zuPOQTOcoR2dRG9ZPD1yQiE6tBKiGL0vbNdSpLWCmf8Uk8FkztBiEVaIr5OewbHlI4Rsji6Ln-zo3P5G35CGF_8/s320/Screenshot_2014-07-10-14-11-55.png)
Wear(上: ホーム画面、中: タップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOVED49nu1vUa7cYr0AzwnSbOpdJ-9Xyophi5t9Gf7gv4QpY-ls03EYyXXtJmDvoxXKjtBKm0Dn6WK0xIjUoaJBi7XYIavmSZmuPN4IEOA2Lbg1oOK9mfCzdaf4cOd8FVgJ2rG5ghZBQCw/s200/device-2014-07-10-140840.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB7RQ6_KWRPKxjTn5RdLfMYJD2Yyq2xxUO5PtcCv9TVO4aqWCs46i94Pk_hR1H478XwuETHR7A5sKLEoNjJfQeQmkofg-RIUZGeEGKjxst31i6NvhzF2PxGFnIaIiRFYWttHEb1OWzB1Me/s200/device-2014-07-10-140845.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtoWfvDU0u2oAAUMOMArlB_R75IZCogw2fJSdSYAPuhcnJJyRLlgSl3NuzIWxDCsJSvmAOmeSuLWialFhiCeHVNdxx5BWIUShm2SpkTFaFbwathB4mqUVL1Jg81O43s7bYOY4r-Wk1o4bz/s200/device-2014-07-10-140850.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbiJws0b9LyVYT5OVqmBAFRZqZPGR2Om2IrkjGBUU5a_gq-dNFGspQAH8asSDznPw-9pLL0Ip0BjVKIe_3zcNGpdQCapVPu1tQlvk3sLmsd-7E0hwbX-pNnVNpF1VATnxOQ-5MMmkFToK1/s200/device-2014-07-10-140856.png)
Notification をまとめる
同じような通知はまとめて表示することが推奨されているが、Wearでは個別の通知の中がみれないのは不便。
そこで、1つのカードにグループ化し、カードをタップするとそれぞれの Notification が個別のカードに別れるよう作ることができる。
Gmailのカードはまさにこの形になっている。
カードをグループ化するには NotificationCompat.Builder.setGroup() で同じ文字列を指定する。
final static String GROUP_KEY_EMAILS = "group_key_emails";
// Build the notification, setting the group appropriately
Notification notif = new NotificationCompat.Builder(mContext)
.setContentTitle("New mail from " + sender1)
.setContentText(subject1)
.setSmallIcon(R.drawable.new_mail);
.setGroup(GROUP_KEY_EMAILS)
.build();
// Issue the notification
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId1, notif);
setGroup() に同じ文字列を指定し、notify() で指定する ID は別にする。
Notification notif2 = new NotificationCompat.Builder(mContext)
.setContentTitle("New mail from " + sender2)
.setContentText(subject2)
.setSmallIcon(R.drawable.new_mail);
.setGroup(GROUP_KEY_EMAILS)
.build();
notificationManager.notify(notificationId2, notif2);
Wear(上: ホーム画面、中: タップした状態、下: 中をタップした状態)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOi0czlJaoMHxe5djvcASgayGTMcuaQeNPzPgIrcDEQMGtRB-nydTOEiY6z7w6RYYxsBXGJWz7gxwQh7Vndab9IUJlwxU6JREzygf94pVQ9oAt4HR1i9Av9aV5_wAoxeBAsr3OOzRwItBV/s200/device-2014-07-10-141845.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN582DPRCGZx_n4mBNAlJHZLdldC1B__GGJyV8Rx05Pj-busmMpYpBzO_OpCYMRdo0UhzWf9TaS9Og92j3X0CriK0Jz-8SEFptNhx2Pivyt5LpAjYNcxWb3hapuY6j65zl7zt8sJtfqogG/s200/device-2014-07-10-141851.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh23oWDKfnv3N0twEN2fsq2RCGeAq6KEUfu88_6Q3Id-CNuoeQx1ptCKaP2GwErc0tTK-eO2fTI5zVXPLn3TpmLIMtnlesfMVKSd9k3Gf0BViDXyD29xJZ8dhw2jY8x6xAVnZQIpq_2ca7X/s200/device-2014-07-10-141856.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZADjSmQS1LQwZw2OqsgkgIUKHQSHc7vaZDhYLtdkRQ0b00whbXZW_tp_VUGHyValpPWZYjfSzTxmiFbgOEQnicHPFXQgbyduOiWihH42qqts45M_OhxUsB8J5RWDfZIBQJzpw590BrC2G/s200/device-2014-07-10-141910.png)
グループ化されたカードがスタックされる順番は、新しく発行されたものが上になる(デフォルト)。
setSortKey() を使うと、順番を任意に指定することができる。
setGroup() を指定した Notification はスマホでは表示されないため、Summary Notification を用意する。 Summary Notification では setGroup() に同じ文字列を指定し、setGroupSummry() に true を指定する。この Summary Notification は Wear では表示されない。
Notification summaryNotification = new NotificationCompat.Builder(mContext)
.setContentTitle("2 new messages")
.setSmallIcon(R.drawable.ic_notif)
.setStyle(new NotificationCompat.InboxStyle()
.addLine(line1)
.addLine(line2)
.setBigContentTitle("2 new messages")
.setSummaryText(summary))
.setGroup(GROUP_KEY_EMAILS)
.setGroupSummary(true)
.build();
notificationManager.notify(notificationId3, summaryNotification);
スマホ
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgctTbxrPdxSrNkkrJTdYG8hJn56RpisBe3HH9Sq3sz8-SiZAAw7uxQv_Y0B2sgyyMxSwXNQdzzYnmI5HDRokPLjPfZUlO77iX5VhrQycmQJLpbQSdcQFcxMZX5Cm5bTsfPpORcDz_j9atZ/s320/Screenshot_2014-07-10-14-29-43.png)
Summary Notification は Wear に直接表示されることはないが、 NotificationCompat.WearableExtender を使ってスタック全体の背景やスタック全体に対する Action を指定できる。
Bitmap background = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_background);
NotificationCompat.WearableExtender wearableExtender =
new NotificationCompat.WearableExtender()
.setBackground(background);
// extend() で背景を指定
Notification summaryNotificationWithBackground =
new NotificationCompat.Builder(mContext)
.setContentTitle("2 new messages")
...
.extend(wearableExtender)
.setGroup(GROUP_KEY_EMAILS)
.setGroupSummary(true)
.build();
Wear
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicocnzDxnlqqRgwT1Kp_B5XThHXJLxIr1VwAbJV2xItm6uYPBlhHIZ4h3ojxfyiyUmo2F3eVdIjwufZ3kzo6Ejj7ifVfizeUHW63WFlVrlAXtnvtN4AGLHDCFKMaJgFaCXXqSy85Fy4S0L/s200/device-2014-07-10-143317.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgurXFuXmxh6dIHrICSVuSQIAqXkaMa5zIe6hOf7ylfjw6ndowpAcdkx_XmN66jfnw8xJc6B7y0kCa_aabXxlJLL15aICH6nKMIM-e90vbTCnRwnVi9q_HQdTJaRmTg7q2YlRURZB0S_bw_/s200/device-2014-07-10-143323.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgu081ezhxnijqCzQHg-hU1xs9PvvK0p41eNPd4PT2eUNwkPK8Gy2SpUU2ioimH_FD9XAVZPwpW1QFHog-DgyYri3LNLBRkbH11JJg3uWVPhe69hiY65I_gJn2HZYAG-krHKWjPw6HRdj0/s200/device-2014-07-10-143327.png)
0 件のコメント:
コメントを投稿