戻る?

Intentで値を引き渡す方法

  http://android.roof-balcony.com/category/intent/

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

明示的なインテントと暗黙的なインテント

明示的インテント(自分のアプリ内のアクティビティを起動)

   コンストラクタ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);

インテントレシーバ

インテントフィルタ

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

Action

戻る?


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