[[戻る>Android]]

[[http://d.hatena.ne.jp/unagi_brandnew/20100309/1268115942]]~
[[http://android.siprop.org/index.php?plugin=attach&refer=%A5%EF%A1%BC%A5%AD%A5%F3%A5%B0%A5%B0%A5%EB%A1%BC%A5%D7%2F%A5%CF%A5%F3%A5%BA%A5%AA%A5%F3%A5%BB%A5%C3%A5%B7%A5%E7%A5%F3%2FHelloIntent&openfile=HelloIntent.pdf>http://docs.google.com/viewer?a=v&q=cache:KRerCorhfxIJ:android.siprop.org/index.php%3Fplugin%3Dattach%26refer%3D%25A5%25EF%25A1%25BC%25A5%25AD%25A5%25F3%25A5%25B0%25A5%25B0%25A5%25EB%25A1%25BC%25A5%25D7%252F%25A5%25CF%25A5%25F3%25A5%25BA%25A5%25AA%25A5%25F3%25A5%25BB%25A5%25C3%25A5%25B7%25A5%25E7%25A5%25F3%252FHelloIntent%26openfile%3DHelloIntent.pdf+%E3%82%A4%E3%83%B3%E3%83%86%E3%83%B3%E3%83%88&hl=ja&gl=jp&pid=bl&srcid=ADGEESiD3Kk6RmflXKwvvxInHpxdEzpQ4L-xzdu42uxZ2WvynaWcr-ynuV108cypivLcQfkMchhvPgS4eUuRaJvx4HNs-IR_CrLOEp5nBCpkExpyLk1ildIo2feBi5G7ire9XemlABKR&sig=AHIEtbT2vu4Xf8QLO9C9DbOcCzE4q0qvRA]]
*Intentで値を引き渡す方法 [#x946e7f9]

コード内で作成して登録したブロードキャストレシーバの場合、インテントフィルタは、Intent Filter オブジェクトとして直接インスタンス化される。それ以外のっ全てのフィルタは、マニフェストで設定する
  http://android.roof-balcony.com/category/intent/



* [#vae2bcf2]


  [[http://d.hatena.ne.jp/unagi_brandnew/20100309/1268115942]]~
  [[http://android.siprop.org/index.php?plugin=attach&refer=%A5%EF%A1%BC%A5%AD%A5%F3%A5%B0%A5%B0%A5%EB%A1%BC%A5%D7%2F%A5%CF%A5%F3%A5%BA%A5%AA%A5%F3%A5%BB%A5%C3%A5%B7%A5%E7%A5%F3%2FHelloIntent&openfile=HelloIntent.pdf>http://docs.google.com/viewer?a=v&q=cache:KRerCorhfxIJ:android.siprop.org/index.php%3Fplugin%3Dattach%26refer%3D%25A5%25EF%25A1%25BC%25A5%25AD%25A5%25F3%25A5%25B0%25A5%25B0%25A5%25EB%25A1%25BC%25A5%25D7%252F%25A5%25CF%25A5%25F3%25A5%25BA%25A5%25AA%25A5%25F3%25A5%25BB%25A5%25C3%25A5%25B7%25A5%25E7%25A5%25F3%252FHelloIntent%26openfile%3DHelloIntent.pdf+%E3%82%A4%E3%83%B3%E3%83%86%E3%83%B3%E3%83%88&hl=ja&gl=jp&pid=bl&srcid=ADGEESiD3Kk6RmflXKwvvxInHpxdEzpQ4L-xzdu42uxZ2WvynaWcr-ynuV108cypivLcQfkMchhvPgS4eUuRaJvx4HNs-IR_CrLOEp5nBCpkExpyLk1ildIo2feBi5G7ire9XemlABKR&sig=AHIEtbT2vu4Xf8QLO9C9DbOcCzE4q0qvRA]]
 
  コード内で作成して登録したブロードキャストレシーバの場合、インテントフィルタは、Intent Filter オブジェクトとして直接インスタンス化される。それ以外のっ全てのフィルタは、マニフェストで設定する


*明示的なインテントと暗黙的なインテント [#g08a580a]
-明示的インテントがアクティビティを直接指定して起動させるのに対し、
-暗黙的インテントでは、明示的に起動させるアクティビティを指定せずにインテントのパラメータに起動するアクティビティをある程度推測できるだけの情報(インテントフィルター)を入れておくと、該当するアクティビティが起動するようになっている


 例)明示的インテント(自分のアプリ内のアクティビティを起動)~
 コンストラクタIntentやsetComponentなどによって明示的に指定する。相手先が明確。~
 Intent intent = new Intent(this, xxx.xxx.xxx.class); //xxxにはパッケージのパスが入る~
 startActivity(intent);~
**明示的インテント(自分のアプリ内のアクティビティを起動) [#p2447a97]
   コンストラクタIntentやsetComponentなどによって明示的に指定する。相手先が明確。~
   Intent intent = new Intent(this, xxx.xxx.xxx.class); //xxxにはパッケージのパスが入る~
   startActivity(intent);~

 例)暗黙的インテント(jpegを送信するアクティビティを起動)~
 Intent intent = new Intent();~
 intent.setAction(Intent.ACTION_SEND);~
 intent.setType("image/jpeg");~
 intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("jpegファイルの場所"));~
 startActivity(intent);~
**暗黙的インテント(jpegを送信するアクティビティを起動) [#b1951ecc]
   Intent intent = new Intent();~
   intent.setAction(Intent.ACTION_SEND);~
   intent.setType("image/jpeg");~
   intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("jpegファイルの場所"));~
   startActivity(intent);~



*インテントレシーバ [#re0a4277]

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

*Action [#r64c2887]

[[戻る>Android]]


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