- The added line is THIS COLOR.
- The deleted line is THIS COLOR.
~
''[[戻る>Android]]''
~
*インテントの引き出しメモ [#r59865cc]
**Intent入門 [#nb8251c2]
参考: [[Think IT - 第4回:Androidの重要な機能、インテント>http://thinkit.jp/article/921/1/]]~
Sampleソース付き~
参考: [[日本Androidの会 - インテントを発行してみよう>http://www.android-group.jp/index.php?plugin=attach&pcmd=open&file=5.00%A5%A4%A5%F3%A5%C6%A5%F3%A5%C8%A4%F2%C8%AF%B9%D4%A4%B7%A4%C6%A4%DF%A4%E8%A4%A6.pdf&refer=%CA%D9%B6%AF%B2%F1%2F%A5%A4%A5%F3%A5%C6%A5%F3%A5%C8%A4%F2%C8%AF%B9%D4%A4%B7%A4%C6%A4%DF%A4%E8%A4%A6]]
**Intentで値を引き渡す方法 [#x946e7f9]
IntentクラスのputExtra()を使用して引き渡したい情報を付加させる~
参考: [[mucchinのAndroid戦記>http://android.roof-balcony.com/category/intent/]]
**Intentで戻り値を受ける方法 [#u4a48877]
呼び出し時にstartActivityではなく、~
呼び出し時にstartActivityForResultを用いる~
結果は、onActivityResult()で取得する
** 様々なIntent連携[#vae2bcf2]
参考 : [[「コードを貼り付けながら。」さんのページ - Intent(インテント)連携をまとめてみる>http://d.hatena.ne.jp/unagi_brandnew/20100309/1268115942]]~
参考 : [[んぱかさんのページ>http://www.saturn.dti.ne.jp/~npaka/android/ActivityEx/index.html]]
~
*明示的なインテントと暗黙的なインテント [#g08a580a]
-明示的インテント : アクティビティを直接指定起動
-暗黙的インテント : インテントのパラメータ起動。ゆるい連携。
**明示的インテント [#p2447a97]
コンストラクタIntentやsetComponentなどによって明示的に指定。相手先が明確。~
~
Intent intent = new Intent(this, xxx.xxx.xxx.class); //xxxにはパッケージのパスが入る~
startActivity(intent);~
**暗黙的インテント [#b1951ecc]
jpegを送信するアクティビティを起動~
Intent intent = new Intent();~
intent.setAction(Intent.ACTION_SEND);~
intent.setType("image/jpeg");~
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("jpegファイルの場所"));~
startActivity(intent);~
ACTION~
CATEGORY~
DATA~
TYPE
~
~
*ブロードキャストレシーバ [#sc917cf5]
http://www.taosoftware.co.jp/blog/2009/03/alarmmanager_5.html
ブロードキャストの多くが元々はシステム コード。以下のようなモノを検知する。~
・時刻が変更された~
・端末が起動された~
・アプリのインストール~
・バッテリー残量低下~
・ユーザーが言語設定を変更~
・写真が撮影された~
・タイム ゾーンが変更された~
*インテントレシーバ [#re0a4277]
http://toru.tea-nifty.com/toru204e/2009/12/post-a4e3.html
*インテントフィルタ [#xc9b4ef2]
インテントフィルタは、2方法ある~
・プログラム内にIntent Filter クラスを使って直接記述~
・マニフェストファイル内に intent-filterタグで記述 (一般的)~
コード内で作成して登録したブロードキャストレシーバの場合、インテントフィルタは、Intent Filter オブジェクトとして直接インスタンス化される。それ以外のっ全てのフィルタは、マニフェストで設定する
[[参考 りょーぺいさんのHP - インテントフィルタのまとめ>http://d.hatena.ne.jp/ryopei/20090826/1251263635]]
http://www.techdoctranslator.com/android/practices/ui_guidelines/activity_task_design
~
''[[戻る>Android]]''