[[戻る>Android]]

~

*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連携[#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);~

~

~

*インテントレシーバ [#re0a4277]
コード内で作成して登録したブロードキャストレシーバの場合、インテントフィルタは、Intent Filter オブジェクトとして直接インスタンス化される。それ以外のっ全てのフィルタは、マニフェストで設定する

*インテントフィルタ [#xc9b4ef2]
 インテントフィルタは、2方法ある~
  ・プログラム内にIntent Filter クラスを使って直接記述~
  ・マニフェストファイル内に intent-filterタグで記述 (一般的)~


~
[[戻る>Android]]

Front page   New List of pages Search Recent changes   Help   RSS of recent changes