Cloud to Device Messaging
こんにちは。
突然ですが、C2DM(Cloud to Device Messaging)って知っていますか?
C2DMとは、名前の通りクラウドからAndroid端末にメッセージ(インテント)を送り、処理させることが出来る機能です。
これにより、例えばメールアプリでは、新着確認のため数分おきにサーバへPollingする、なんてことをしなくても、必要な時のみサーバからアプリへPush、ということが可能になります。
C2DMは大まかに次のような流れで処理されます。
- 準備
1.端末内のアプリをGoogleのC2DMサーバに登録し、IDを取得。
2.IDをアプリケーションサーバに通知。
- メッセージ送信
3.アプリケーションサーバからIDとインテントをC2DMサーバに送信。
4.C2DMサーバから端末にインテントが通知される。
- アプリ起動
5.IntentReceiverでインテントを処理するため、アプリが目覚めます。
6.必要ならばC2DMサーバから登録解除します。
また、サンプルとしてchrometophoneというアプリが公開されています。
ソースコード等参考になると思います。
ChromeExtentionでインテントを送り、ブラウザで見ているWebページをAndroid端末のブラウザで表示してくれます。GoogleMapの場合、マップが起動します。
http://code.google.com/p/chrometophone/
chrometophoneを実際に試している方の映像です。
Android 2.2の新機能を見ていたときになぜかスルーしていたのですが(汗、これはすごいですね。サーバから端末へのPUSHが可能になることで、Androidの可能性がまた大きく広がったように思います。
C2DMに関しての資料が見つけにくかったので、以下に紹介しておきます。
C2DMの概要
http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html
C2DM Frameworkについて
http://code.google.com/intl/ja-JP/android/c2dm/index.html

Post Edited: Cloud to Device Messaging http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
これはすごい(白々しいですが)。やっぱNexus Oneを買わないといけないかな。 RT @techfirmlab: Post Edited: Cloud to Device Messaging http://goo.gl/tIHZ
This comment was originally posted on Twitter
Nexus Oneあると心強いです。RT @just_do_neet: これはすごい(白々しいですが)。やっぱNexus Oneを買わないといけないかな。 RT @techfirmlab Cloud to Device Messaging http://goo.gl/tIHZ
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://ff.im/-lASPe
This comment was originally posted on Twitter
[B!] Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter
Cloud to Device Messaging | Techfirm Android Lab http://labs.techfirm.co.jp/android/mita/2500
This comment was originally posted on Twitter